MCPcopy Create free account
hub / github.com/apache/datafusion / test_cli

Function test_cli

datafusion-cli/tests/cli_integration.rs:308–340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

306
307#[tokio::test]
308async fn test_cli() {
309 if env::var("TEST_STORAGE_INTEGRATION").is_err() {
310 eprintln!("Skipping external storages integration tests");
311 return;
312 }
313
314 let container = match setup_minio_container().await {
315 Ok(c) => c,
316 Err(e) if e.contains("toomanyrequests") => {
317 eprintln!("Skipping test: Docker pull rate limit reached: {e}");
318 return;
319 }
320 e @ Err(_) => e.unwrap(),
321 };
322
323 let settings = make_settings();
324 let _bound = settings.bind_to_scope();
325
326 let port = container.get_host_port_ipv4(9000).await.unwrap();
327
328 glob!("sql/integration/*.sql", |path| {
329 let input = fs::read_to_string(path).unwrap();
330 assert_cmd_snapshot!(
331 cli()
332 .env_clear()
333 .env("AWS_ACCESS_KEY_ID", "TEST-DataFusionLogin")
334 .env("AWS_SECRET_ACCESS_KEY", "TEST-DataFusionPassword")
335 .env("AWS_ENDPOINT", format!("http://localhost:{port}"))
336 .env("AWS_ALLOW_HTTP", "true")
337 .pass_stdin(input)
338 )
339 });
340}
341
342#[tokio::test]
343async fn test_aws_options() {

Callers

nothing calls this directly

Calls 4

setup_minio_containerFunction · 0.85
is_errMethod · 0.80
make_settingsFunction · 0.70
containsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…