Skip to content

Conversation

@andrewhsu
Copy link
Contributor

- What I did

Added e2e test to verify docker rmi -f returns unix code success always because -f.

- How I did it

At my desk.

- How to verify it

$ make -f docker.Makefile test-e2e
...
=== RUN   TestForceRemoveImage
--- PASS: TestForceRemoveImage (0.16s)
PASS

- Description for the changelog

N/A

- A picture of a cute animal (not mandatory but encouraged)

🐛

@codecov-io
Copy link

codecov-io commented Sep 27, 2017

Codecov Report

Merging #567 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #567      +/-   ##
==========================================
+ Coverage    49.4%   49.41%   +0.01%     
==========================================
  Files         208      208              
  Lines       17159    17159              
==========================================
+ Hits         8477     8479       +2     
+ Misses       8249     8247       -2     
  Partials      433      433

golden.Assert(t, result.Stderr(), "run-attached-from-remote-and-remove.golden")
}

func TestForceRemoveImage(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have test coverage for that here in the unit test suite: https://github.com/docker/cli/blob/master/cli/command/image/remove_test.go#L71-L78

Following https://github.com/docker/cli/blob/master/TESTING.md#guidelines I don't think we need an e2e test for the force flag.

I unit test for a successful docker rmi would be good, but it would go in the e2e/image package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants