()
| 246 | |
| 247 | #[tokio::test] |
| 248 | async fn query_http_location_test() -> Result<()> { |
| 249 | // This is a unit test so not expecting a connection or a file to be |
| 250 | // available |
| 251 | let domain = "example.com"; |
| 252 | let location = format!("http://{domain}/file.parquet"); |
| 253 | |
| 254 | let (ctx, schema) = setup_context(); |
| 255 | |
| 256 | // That's a non registered table so expecting None here |
| 257 | let table = schema.table(&location).await?; |
| 258 | assert!(table.is_none()); |
| 259 | |
| 260 | // It should still create an object store for the location in the SessionState |
| 261 | let store = ctx |
| 262 | .runtime_env() |
| 263 | .object_store(ListingTableUrl::parse(location)?)?; |
| 264 | |
| 265 | assert_eq!(format!("{store}"), "HttpStore"); |
| 266 | |
| 267 | // The store must be configured for this domain |
| 268 | let expected_domain = format!("Domain(\"{domain}\")"); |
| 269 | assert!(format!("{store:?}").contains(&expected_domain)); |
| 270 | |
| 271 | Ok(()) |
| 272 | } |
| 273 | |
| 274 | #[tokio::test] |
| 275 | async fn query_s3_location_test() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…