Skip to content

test rmi -f returns success - #567

Closed
andrewhsu wants to merge 1 commit into
docker:masterfrom
andrewhsu:rmi-f
Closed

test rmi -f returns success#567
andrewhsu wants to merge 1 commit into
docker:masterfrom
andrewhsu:rmi-f

Conversation

@andrewhsu

Copy link
Copy Markdown
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)

🐛

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
@codecov-io

codecov-io commented Sep 27, 2017

Copy link
Copy Markdown

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
Copy Markdown
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 freeto 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

@andrewhsu@codecov-io@dnephin@GordonTheTurtle