From 591c416d5554296fb41c54246ed25ab0624d8b04 Mon Sep 17 00:00:00 2001 From: Dima Pristupa Date: Mon, 14 Oct 2024 19:01:35 +0300 Subject: [PATCH] E2E: activate new tests for PostgreSQL --- .../cli/postgres/tests/tests/commands/mod.rs | 20 ++++ .../tests/tests/commands/test_add_command.rs | 40 +++++++ .../tests/commands/test_compact_command.rs | 36 +++++++ .../tests/commands/test_config_command.rs | 33 ++++++ .../tests/commands/test_delete_command.rs | 33 ++++++ .../tests/commands/test_ingest_command.rs | 57 ++++++++++ .../tests/tests/commands/test_init_command.rs | 36 +++++++ .../tests/commands/test_inspect_command.rs | 35 ++++++ .../tests/tests/commands/test_log_command.rs | 21 ++++ .../tests/commands/test_login_command.rs | 27 +++++ .../tests/tests/commands/test_new_command.rs | 26 +++++ .../tests/commands/test_rename_command.rs | 19 ++++ .../tests/tests/commands/test_repo_command.rs | 26 +++++ .../tests/commands/test_reset_command.rs | 20 ++++ .../tests/commands/test_search_command.rs | 40 +++++++ .../tests/tests/commands/test_sql_command.rs | 38 +++++++ .../commands/test_system_diagnose_command.rs | 19 ++++ .../tests/commands/test_system_gc_command.rs | 19 ++++ .../commands/test_system_info_command.rs | 19 ++++ .../tests/tests/commands/test_tail_command.rs | 21 ++++ .../tests/commands/test_verify_command.rs | 36 +++++++ .../tests/test_smart_transfer_protocol.rs | 101 ++++++++++++++++++ 22 files changed, 722 insertions(+) create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_add_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_compact_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_config_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_delete_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_ingest_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_init_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_inspect_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_log_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_login_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_new_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_rename_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_repo_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_reset_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_search_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_sql_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_system_diagnose_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_system_gc_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_system_info_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_tail_command.rs create mode 100644 src/e2e/app/cli/postgres/tests/tests/commands/test_verify_command.rs diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/mod.rs b/src/e2e/app/cli/postgres/tests/tests/commands/mod.rs index b58f493b3..c3408f409 100644 --- a/src/e2e/app/cli/postgres/tests/tests/commands/mod.rs +++ b/src/e2e/app/cli/postgres/tests/tests/commands/mod.rs @@ -7,5 +7,25 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0. +mod test_add_command; +mod test_compact_command; +mod test_config_command; +mod test_delete_command; +mod test_ingest_command; +mod test_init_command; +mod test_inspect_command; +mod test_log_command; +mod test_login_command; +mod test_new_command; +mod test_rename_command; +mod test_repo_command; +mod test_reset_command; +mod test_search_command; +mod test_sql_command; mod test_system_api_server_gql_query; +mod test_system_diagnose_command; +mod test_system_gc_command; mod test_system_generate_token_command; +mod test_system_info_command; +mod test_tail_command; +mod test_verify_command; diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_add_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_add_command.rs new file mode 100644 index 000000000..407eb9cbc --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_add_command.rs @@ -0,0 +1,40 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_add_dataset_from_stdin +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_add_dataset_with_name +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_add_dataset_with_replace +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_add_recursive +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_compact_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_compact_command.rs new file mode 100644 index 000000000..90d11dab3 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_compact_command.rs @@ -0,0 +1,36 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_compact_hard + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_compact_keep_metadata_only + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_compact_verify + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_config_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_config_command.rs new file mode 100644 index 000000000..0547a3e80 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_config_command.rs @@ -0,0 +1,33 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_config_set_value +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_config_reset_key +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_config_get_with_default +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_delete_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_delete_command.rs new file mode 100644 index 000000000..faa7a6a99 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_delete_command.rs @@ -0,0 +1,33 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_delete_dataset +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_delete_dataset_recursive +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_delete_dataset_all +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_ingest_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_ingest_command.rs new file mode 100644 index 000000000..a9fd603d7 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_ingest_command.rs @@ -0,0 +1,57 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_push_ingest_from_file_ledger, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_push_ingest_from_file_snapshot_with_event_time, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_ingest_from_stdin, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_ingest_recursive, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_ingest_with_source_name, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_init_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_init_command.rs new file mode 100644 index 000000000..0617e08c6 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_init_command.rs @@ -0,0 +1,36 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = sqlite, + fixture = kamu_cli_e2e_repo_tests::test_init_exist_ok_st, + options = Options::default().with_no_workspace() +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = sqlite, + fixture = kamu_cli_e2e_repo_tests::test_init_exist_ok_mt, + options = Options::default().with_no_workspace() +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = sqlite, + fixture = kamu_cli_e2e_repo_tests::test_init_in_an_existing_workspace, + options = Options::default().with_no_workspace() +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_inspect_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_inspect_command.rs new file mode 100644 index 000000000..96239fd6c --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_inspect_command.rs @@ -0,0 +1,35 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_inspect_lineage, +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_inspect_query, + options = Options::default().with_frozen_system_time() +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_inspect_schema, + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_log_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_log_command.rs new file mode 100644 index 000000000..c2449941d --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_log_command.rs @@ -0,0 +1,21 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_log, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_login_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_login_command.rs new file mode 100644 index 000000000..98b7aecd3 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_login_command.rs @@ -0,0 +1,27 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_login_logout_password, +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_login_logout_oauth, + options = Options::default().with_multi_tenant() +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_new_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_new_command.rs new file mode 100644 index 000000000..3c65ebef4 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_new_command.rs @@ -0,0 +1,26 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_new_root, +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_new_derivative, +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_rename_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_rename_command.rs new file mode 100644 index 000000000..64a5565da --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_rename_command.rs @@ -0,0 +1,19 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_rename_dataset +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_repo_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_repo_command.rs new file mode 100644 index 000000000..eeec2744e --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_repo_command.rs @@ -0,0 +1,26 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_repository_pull_aliases_commands +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_repository_push_aliases_commands +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_reset_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_reset_command.rs new file mode 100644 index 000000000..1161e8059 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_reset_command.rs @@ -0,0 +1,20 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_reset, + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_search_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_search_command.rs new file mode 100644 index 000000000..135de4131 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_search_command.rs @@ -0,0 +1,40 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_search_by_name + // We need synthetic time for the tests, but the third-party JWT code + // uses the current time. Assuming that the token lifetime is 24 hours, we will + // use the projected date (the current day) as a workaround. + options = Options::default() + .with_multi_tenant() + .with_today_as_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_search_by_repo + // We need synthetic time for the tests, but the third-party JWT code + // uses the current time. Assuming that the token lifetime is 24 hours, we will + // use the projected date (the current day) as a workaround. + options = Options::default() + .with_multi_tenant() + .with_today_as_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_sql_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_sql_command.rs new file mode 100644 index 000000000..339bc6586 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_sql_command.rs @@ -0,0 +1,38 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_datafusion_cli, + extra_test_groups = "engine, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_datafusion_cli_not_launched_in_root_ws, + options = Options::default().with_no_workspace(), + extra_test_groups = "engine, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_sql_command, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "engine, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_system_diagnose_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_system_diagnose_command.rs new file mode 100644 index 000000000..9d1968db8 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_system_diagnose_command.rs @@ -0,0 +1,19 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_system_diagnose +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_system_gc_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_system_gc_command.rs new file mode 100644 index 000000000..0a95452b5 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_system_gc_command.rs @@ -0,0 +1,19 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_gc +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_system_info_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_system_info_command.rs new file mode 100644 index 000000000..63a713ca8 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_system_info_command.rs @@ -0,0 +1,19 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_system_info +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_tail_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_tail_command.rs new file mode 100644 index 000000000..9950b16af --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_tail_command.rs @@ -0,0 +1,21 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_tail, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/commands/test_verify_command.rs b/src/e2e/app/cli/postgres/tests/tests/commands/test_verify_command.rs new file mode 100644 index 000000000..e2f423962 --- /dev/null +++ b/src/e2e/app/cli/postgres/tests/tests/commands/test_verify_command.rs @@ -0,0 +1,36 @@ +// Copyright Kamu Data, Inc. and contributors. All rights reserved. +// +// Use of this software is governed by the Business Source License +// included in the LICENSE file. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0. + +use kamu_cli_e2e_common::prelude::*; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_verify_regular_dataset + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_verify_recursive + extra_test_groups = "containerized, engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_verify_integrity + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/e2e/app/cli/postgres/tests/tests/test_smart_transfer_protocol.rs b/src/e2e/app/cli/postgres/tests/tests/test_smart_transfer_protocol.rs index fd35d189c..d1faad338 100644 --- a/src/e2e/app/cli/postgres/tests/tests/test_smart_transfer_protocol.rs +++ b/src/e2e/app/cli/postgres/tests/tests/test_smart_transfer_protocol.rs @@ -24,3 +24,104 @@ kamu_cli_run_api_server_e2e_test!( ); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_force_push_pull, + options = Options::default() + .with_multi_tenant() + .with_today_as_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_push_pull_add_alias, + options = Options::default() + .with_multi_tenant() + .with_today_as_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_pull_as, + options = Options::default() + .with_multi_tenant() + .with_today_as_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_push_pull_all, + options = Options::default() + .with_multi_tenant() + .with_today_as_frozen_system_time(), + extra_test_groups = "containerized, engine, ingest, transform, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_push_pull_recursive, + options = Options::default() + .with_multi_tenant() + .with_today_as_frozen_system_time(), + extra_test_groups = "containerized, engine, ingest, transform, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_pull_set_watermark, + options = Options::default().with_frozen_system_time(), +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_pull_reset_derivative, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "containerized, engine, ingest, transform, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_run_api_server_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_push_visibility, + options = Options::default() + .with_multi_tenant() + .with_today_as_frozen_system_time(), + extra_test_groups = "engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_push_pull_s3, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "containerized, engine, ingest, datafusion" +); + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +kamu_cli_execute_command_e2e_test!( + storage = postgres, + fixture = kamu_cli_e2e_repo_tests::test_smart_pull_derivative, + options = Options::default().with_frozen_system_time(), + extra_test_groups = "containerized, engine, ingest, transform, datafusion" +); + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////