-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker_image, docker_image_facts, docker_volume: add basic integration tests #47383
Conversation
Hi @felixfontein, thank you for submitting this pull-request! |
CC "the usual suspects" @akshay196 @danihodovic @dariko @jwitko @kassiansun @pilou- @tbouvet :) |
CC @agronholm as author of docker_volume (no idea why the bot ignored you...) bot_status |
Componentschangelogs/fragments/docker_volume-force-change-detection.yaml lib/ansible/modules/cloud/docker/docker_volume.py test/integration/targets/docker_image/aliases test/integration/targets/docker_image/meta/main.yml test/integration/targets/docker_image/tasks/main.yml test/integration/targets/docker_image/tasks/run-test.yml test/integration/targets/docker_image/tasks/tests/basic.yml test/integration/targets/docker_image_facts/aliases test/integration/targets/docker_image_facts/meta/main.yml test/integration/targets/docker_image_facts/tasks/main.yml test/integration/targets/docker_volume/aliases test/integration/targets/docker_volume/meta/main.yml test/integration/targets/docker_volume/tasks/main.yml test/integration/targets/docker_volume/tasks/run-test.yml test/integration/targets/docker_volume/tasks/tests/basic.yml Metadatawaiting_on: maintainer |
@@ -223,7 +223,7 @@ def present(self): | |||
if self.existing_volume: | |||
differences = self.has_different_config() | |||
|
|||
if differences and self.parameters.force: | |||
if differences or self.parameters.force: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a fix that should come as a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can move it into a separate PR. I'll then rebase this PR once that PR is merged (as otherwise the test won't work :) ).
37c84e1
to
8277f8b
Compare
I rebased against current |
shipit |
shipit |
Thanks @felixfontein, are you able to backport these tests to stable-2.7 and stable-2.6? |
@jborean93 I'll create a 2.7 backport, but 2.6 is more complicated (since it is based on several other PRs which aren't backported). I once tried to backport a similar testsuite (for docker_container), and gave up after cherry-picking several PRs and still not finding out what else needs to be cherry-picked for it... I might try it again later, but for now I'll stick to 2.7 :) |
No worries, just do what you can. |
…n tests (ansible#47383) * Add docker_image_facts tests. * Add basic integration test for docker_volume. * Add basic docker_image tests. * Only start test registry when tests are actually run (i.e. not on CentOS 6). (cherry picked from commit f19ab56)
…n tests (ansible#47383) * Add docker_image_facts tests. * Add basic integration test for docker_volume. * Add basic docker_image tests. * Only start test registry when tests are actually run (i.e. not on CentOS 6).
SUMMARY
Adds basic integration tests (in the style as for docker_container and docker_network) to docker_image, docker_image_facts, and docker_volume.
Fixes a bug in docker_volume which caused volumes to only be recreated if(moved to #47390)force == yes
and configuration changed (instead of or).ISSUE TYPE
COMPONENT NAME
docker_image
docker_image_facts
docker_volume
ANSIBLE VERSION