Skip to content

Commit

Permalink
E2E: activate new tests for SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
s373r committed Oct 14, 2024
1 parent d17bfd1 commit 124b442
Show file tree
Hide file tree
Showing 22 changed files with 736 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
40 changes: 40 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/test_add_command.rs
Original file line number Diff line number Diff line change
@@ -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 = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_add_dataset_from_stdin
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_add_dataset_with_name
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_add_dataset_with_replace
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_add_recursive
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change
@@ -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_compact_hard
extra_test_groups = "engine, ingest, datafusion"
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_compact_keep_metadata_only
extra_test_groups = "engine, ingest, datafusion"
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_compact_verify
extra_test_groups = "engine, ingest, datafusion"
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
33 changes: 33 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/test_config_command.rs
Original file line number Diff line number Diff line change
@@ -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 = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_config_set_value
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_config_reset_key
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_config_get_with_default
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
33 changes: 33 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/test_delete_command.rs
Original file line number Diff line number Diff line change
@@ -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 = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_delete_dataset
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_delete_dataset_recursive
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_delete_dataset_all
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
57 changes: 57 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/test_ingest_command.rs
Original file line number Diff line number Diff line change
@@ -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 = sqlite,
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 = sqlite,
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 = sqlite,
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 = sqlite,
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 = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_ingest_with_source_name,
options = Options::default().with_frozen_system_time(),
extra_test_groups = "engine, ingest, datafusion"
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
53 changes: 53 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/test_init_command.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// 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_multi_tenant_creates_sqlite_database,
options = Options::default().with_no_workspace()
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture =
kamu_cli_e2e_repo_tests::test_init_multi_tenant_with_exists_ok_flag_creates_sqlite_database,
options = Options::default().with_no_workspace()
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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()
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change
@@ -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 = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_inspect_lineage,
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_inspect_query,
options = Options::default().with_frozen_system_time()
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_inspect_schema,
extra_test_groups = "engine, ingest, datafusion"
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
21 changes: 21 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/test_log_command.rs
Original file line number Diff line number Diff line change
@@ -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 = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_log,
options = Options::default().with_frozen_system_time(),
extra_test_groups = "engine, ingest, datafusion"
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
27 changes: 27 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/test_login_command.rs
Original file line number Diff line number Diff line change
@@ -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 = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_login_logout_password,
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_run_api_server_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_login_logout_oauth,
options = Options::default().with_multi_tenant()
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
26 changes: 26 additions & 0 deletions src/e2e/app/cli/sqlite/tests/tests/commands/test_new_command.rs
Original file line number Diff line number Diff line change
@@ -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 = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_new_root,
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kamu_cli_execute_command_e2e_test!(
storage = sqlite,
fixture = kamu_cli_e2e_repo_tests::test_new_derivative,
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Loading

0 comments on commit 124b442

Please sign in to comment.