Skip to content

[WIP] [test-integration] Move TearDownTest cleaning to environment package#30759

Closed
vdemeester wants to merge 1 commit intomoby:masterfrom
vdemeester:integration-clean-in-env
Closed

[WIP] [test-integration] Move TearDownTest cleaning to environment package#30759
vdemeester wants to merge 1 commit intomoby:masterfrom
vdemeester:integration-clean-in-env

Conversation

@vdemeester
Copy link
Copy Markdown
Member

Move the clean functions of integration-cli in the environment package (and mainly in testEnv.Clean(…) function).

This does several things though:

  • Use the API instead of cli. This, strangely, make it fail related to RFD: allow parent images to be removed (with --force) #30722 (cc @tonistiigi)
  • It protects more stuff : any container, image, volume, plugin or network present in the daemon before running the integration-test would be preserved (it's not perfect but…). This mean it's a little bit safer to run in on an external daemon (or on your local daemon on your laptop 👼 ).

It currently fails (see above). I'm trying to see how to fix that (worst case scenario, I'll use the cli for images cleaning temporarly).

/cc @thaJeztah @tonistiigi @tiborvass @dnephin @icecrime @cpuguy83 @LK4D4

🐸

Signed-off-by: Vincent Demeester [email protected]

@vdemeester vdemeester changed the title [WIP] Move TearDownTest cleaning to environment package [WIP] [test-integration] Move TearDownTest cleaning to environment package Feb 6, 2017
@vdemeester vdemeester force-pushed the integration-clean-in-env branch 3 times, most recently from bffe573 to ff33453 Compare February 6, 2017 13:33
@vdemeester vdemeester added the status/failing-ci Indicates that the PR in its current state fails the test suite label Feb 6, 2017
Comment thread integration-cli/environment/clean.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some nits:

"Clean the environment, preserving protected objects"

"and removing everything else"

"depend on each other"

Comment thread integration-cli/environment/clean.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

delete ?

Comment thread integration-cli/environment/clean.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is elts ? maybe items ?

@vdemeester
Copy link
Copy Markdown
Member Author

Ok I'll do that one it 2 separate PRs.. one to move the clean there (without changing how it is cleaned) and then a follow-up to use API to clean (that will give me time to see why it fails 👼)

@vdemeester vdemeester force-pushed the integration-clean-in-env branch 3 times, most recently from ca0d4e0 to 309d507 Compare February 15, 2017 13:47
@vdemeester
Copy link
Copy Markdown
Member Author

#31460 is taking this over.

@vdemeester vdemeester closed this Mar 1, 2017
@vdemeester vdemeester deleted the integration-clean-in-env branch March 1, 2017 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/failing-ci Indicates that the PR in its current state fails the test suite status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants