diff --git a/integration/testdata/get-help.golden b/integration/testdata/get-help.golden new file mode 100644 index 0000000..0b0189e --- /dev/null +++ b/integration/testdata/get-help.golden @@ -0,0 +1,18 @@ +Get detailed information about a given container. + +Usage: + kanto-cm get + +Examples: +get + get --name + get -n + +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) diff --git a/integration/testdata/get-test.yaml b/integration/testdata/get-test.yaml new file mode 100644 index 0000000..0bb4241 --- /dev/null +++ b/integration/testdata/get-test.yaml @@ -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." \ No newline at end of file