()
| 442 | |
| 443 | #[tokio::test] |
| 444 | async fn test_s3_url_fallback() { |
| 445 | if env::var("TEST_STORAGE_INTEGRATION").is_err() { |
| 446 | eprintln!("Skipping external storages integration tests"); |
| 447 | return; |
| 448 | } |
| 449 | |
| 450 | let container = match setup_minio_container().await { |
| 451 | Ok(c) => c, |
| 452 | Err(e) if e.contains("toomanyrequests") => { |
| 453 | eprintln!("Skipping test: Docker pull rate limit reached: {e}"); |
| 454 | return; |
| 455 | } |
| 456 | e @ Err(_) => e.unwrap(), |
| 457 | }; |
| 458 | |
| 459 | let mut settings = make_settings(); |
| 460 | settings.set_snapshot_suffix("s3_url_fallback"); |
| 461 | let _bound = settings.bind_to_scope(); |
| 462 | |
| 463 | // Create a table using a prefix path (without trailing slash) |
| 464 | // This should trigger the fallback logic where head() fails on the prefix |
| 465 | // and list() is used to discover the actual files |
| 466 | let input = r#"CREATE EXTERNAL TABLE partitioned_data |
| 467 | STORED AS CSV |
| 468 | LOCATION 's3://data/partitioned_csv' |
| 469 | OPTIONS ( |
| 470 | 'format.has_header' 'false' |
| 471 | ); |
| 472 | |
| 473 | SELECT * FROM partitioned_data ORDER BY column_1, column_2 LIMIT 5; |
| 474 | "#; |
| 475 | |
| 476 | assert_cmd_snapshot!(cli().with_minio(&container).await.pass_stdin(input)); |
| 477 | } |
| 478 | |
| 479 | /// Validate object store profiling output |
| 480 | #[tokio::test] |
nothing calls this directly
no test coverage detected
searching dependent graphs…