-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E2E, test_new_{root,derivative}(): add
- Loading branch information
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/e2e/app/cli/inmem/tests/tests/commands/test_new_command.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = inmem, | ||
fixture = kamu_cli_e2e_repo_tests::test_new_root, | ||
); | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
kamu_cli_execute_command_e2e_test!( | ||
storage = inmem, | ||
fixture = kamu_cli_e2e_repo_tests::test_new_derivative, | ||
); | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
src/e2e/app/cli/repo-tests/src/commands/test_new_command.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// 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_puppet::KamuCliPuppet; | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
pub async fn test_new_root(kamu: KamuCliPuppet) { | ||
let assert = kamu | ||
.execute(["new", "--root", "test-dataset"]) | ||
.await | ||
.success(); | ||
|
||
let stderr = std::str::from_utf8(&assert.get_output().stderr).unwrap(); | ||
|
||
assert!( | ||
stderr.contains(indoc::indoc!( | ||
r#" | ||
Written new manifest template to: test-dataset.yaml | ||
Follow directions in the file's comments and use `kamu add test-dataset.yaml` when ready. | ||
"# | ||
)), | ||
"Unexpected output:\n{stderr}", | ||
); | ||
|
||
// TODO: After solving this issue, add `kamu add` calls and populate with | ||
// data | ||
// | ||
// `kamu new`: generate snapshots that will be immediately ready to be | ||
// added/worked on | ||
// https://github.com/kamu-data/kamu-cli/issues/888 | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
pub async fn test_new_derivative(kamu: KamuCliPuppet) { | ||
let assert = kamu | ||
.execute(["new", "--derivative", "test-dataset"]) | ||
.await | ||
.success(); | ||
|
||
let stderr = std::str::from_utf8(&assert.get_output().stderr).unwrap(); | ||
|
||
assert!( | ||
stderr.contains(indoc::indoc!( | ||
r#" | ||
Written new manifest template to: test-dataset.yaml | ||
Follow directions in the file's comments and use `kamu add test-dataset.yaml` when ready. | ||
"# | ||
)), | ||
"Unexpected output:\n{stderr}", | ||
); | ||
|
||
// TODO: After solving this issue, add `kamu add` calls and populate with | ||
// data | ||
// | ||
// `kamu new`: generate snapshots that will be immediately ready to be | ||
// added/worked on | ||
// https://github.com/kamu-data/kamu-cli/issues/888 | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |