forked from eclipse-kanto/container-management
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eclipse-kanto#118] Provide integration test for the CLI get command
Created golden file and test case scenarios with exit code 1. Signed-off-by: Daniel Milchev <fixed-term.daniel.milchev@bosch.io>
- Loading branch information
1 parent
4108c97
commit 156d6f1
Showing
2 changed files
with
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Get detailed information about a given container. | ||
|
||
Usage: | ||
kanto-cm get <container-id> | ||
|
||
Examples: | ||
get <container-id> | ||
get --name <container-name> | ||
get -n <container-name> | ||
|
||
Flags: | ||
-h, --help help for get | ||
-n, --name string Get the information about a container with a specific name. | ||
|
||
Global Flags: | ||
--debug Switch commands log level to DEBUG mode | ||
--host string Specify the address path to the Eclipse Kanto container management (default "/run/container-management/container-management.sock") | ||
--timeout int Specify the connection timeout in seconds to the Eclipse Kanto container management (default 30) |
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,23 @@ | ||
name: get_help | ||
command: | ||
binary: kanto-cm | ||
args: ["get", "-h"] | ||
expected: | ||
exitCode: 0 | ||
goldenFile: "get-help.golden" | ||
--- | ||
name: get_invalid_id | ||
command: | ||
binary: kanto-cm | ||
args: ["get", "invalid"] | ||
expected: | ||
exitCode: 1 | ||
err: "Error: The requested container with ID = invalid was not found" | ||
--- | ||
name: get_invalid_name | ||
command: | ||
binary: kanto-cm | ||
args: ["get", "-n", "invalid"] | ||
expected: | ||
exitCode: 1 | ||
err: "Error: The requested container with name = invalid was not found. Try using an ID instead." |