diff options
author | Adrien Folie <folie.adrien@gmail.com> | 2014-06-30 01:31:16 +0200 |
---|---|---|
committer | Adrien Folie <folie.adrien@gmail.com> | 2014-06-30 01:31:16 +0200 |
commit | 9a2771eac22950fce43702896052f5187944de6d (patch) | |
tree | 19731d1d19accc63fb6f9e2b31017f083eb2d652 /integration-cli/docker_cli_history_test.go | |
parent | 2075ef029e37d54466a223f68c8837c7b67782c5 (diff) | |
download | docker-9a2771eac22950fce43702896052f5187944de6d.tar.gz |
Migrate TestGetImagesHistory into unit and CLI test
Docker-DCO-1.1-Signed-off-by: Adrien Folie <folie.adrien@gmail.com> (github: folieadrien)
Diffstat (limited to 'integration-cli/docker_cli_history_test.go')
-rw-r--r-- | integration-cli/docker_cli_history_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/integration-cli/docker_cli_history_test.go b/integration-cli/docker_cli_history_test.go index 42edec2fd6..59ad117128 100644 --- a/integration-cli/docker_cli_history_test.go +++ b/integration-cli/docker_cli_history_test.go @@ -41,3 +41,21 @@ func TestBuildHistory(t *testing.T) { deleteImages("testbuildhistory") } + +func TestHistoryExistentImage(t *testing.T) { + historyCmd := exec.Command(dockerBinary, "history", "busybox") + _, exitCode, err := runCommandWithOutput(historyCmd) + if err != nil || exitCode != 0 { + t.Fatal("failed to get image history") + } + logDone("history - history on existent image must not fail") +} + +func TestHistoryNonExistentImage(t *testing.T) { + historyCmd := exec.Command(dockerBinary, "history", "testHistoryNonExistentImage") + _, exitCode, err := runCommandWithOutput(historyCmd) + if err == nil || exitCode == 0 { + t.Fatal("history on a non-existent image didn't result in a non-zero exit status") + } + logDone("history - history on non-existent image must fail") +} |