()
| 341 | |
| 342 | #[tokio::test] |
| 343 | async fn test_aws_options() { |
| 344 | // Separate test is needed to pass aws as options in sql and not via env |
| 345 | |
| 346 | if env::var("TEST_STORAGE_INTEGRATION").is_err() { |
| 347 | eprintln!("Skipping external storages integration tests"); |
| 348 | return; |
| 349 | } |
| 350 | |
| 351 | let settings = make_settings(); |
| 352 | let _bound = settings.bind_to_scope(); |
| 353 | |
| 354 | let container = match setup_minio_container().await { |
| 355 | Ok(c) => c, |
| 356 | Err(e) if e.contains("toomanyrequests") => { |
| 357 | eprintln!("Skipping test: Docker pull rate limit reached: {e}"); |
| 358 | return; |
| 359 | } |
| 360 | e @ Err(_) => e.unwrap(), |
| 361 | }; |
| 362 | let port = container.get_host_port_ipv4(9000).await.unwrap(); |
| 363 | |
| 364 | let input = format!( |
| 365 | r#"CREATE EXTERNAL TABLE CARS |
| 366 | STORED AS CSV |
| 367 | LOCATION 's3://data/cars.csv' |
| 368 | OPTIONS( |
| 369 | 'aws.access_key_id' 'TEST-DataFusionLogin', |
| 370 | 'aws.secret_access_key' 'TEST-DataFusionPassword', |
| 371 | 'aws.endpoint' 'http://localhost:{port}', |
| 372 | 'aws.allow_http' 'true' |
| 373 | ); |
| 374 | |
| 375 | SELECT * FROM CARS limit 1; |
| 376 | "# |
| 377 | ); |
| 378 | |
| 379 | assert_cmd_snapshot!(cli().env_clear().pass_stdin(input)); |
| 380 | } |
| 381 | |
| 382 | #[tokio::test] |
| 383 | async fn test_aws_region_auto_resolution() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…