[ ] Consider starting by duplicating the existing integration tests for the docker_container_copy_into module at tests/integration/targets/docker_container_copy_into (will need to adjust these tests make sense given that this module is the exact opposite of the new docker_container_copy_out module
[ ] Choose a method for running the tests (more below)
Note: You probably don't need to worry about having ALL integration tests in the repo pass - only the new tests that you create. Some of the other tests may not pass locally - that's OK, we'll check them against a specialized environment using GitHub actions after you push your changes up. ansible-test integration does let you pass the name of a specific test to run. It will expect the name of the folder your test/role lives in - so it should be: ansible-test integration docker_container_copy_out.
There are some other methods mentioned in the Medium article (Locally, SSH) - but you may find it easiest to run the tests using Docker containers as supported by ansible-test.
If you want to do that, I would probably recommend:
[x] Set up a Virtual Machine running Linux (I would recommend Ubuntu)
[ ] Install the Docker daemon on the VM
[ ] Install Ansible on the VM (make sure ansible-test is installed)
[ ] Clone this repository onto the VM
[ ] Run ansible-test integration --docker from the project's folder
@logansauers - let me know if you have any questions on this! I would be happy to help (though, I am not an expert on this either so I will probably be learning with you!).
Add integration tests for the
docker_container_copy_out
module from the existingfeature/docker_container_copy_out
branch.As a way to get started:
docker_container_copy_into
module attests/integration/targets/docker_container_copy_into
(will need to adjust these tests make sense given that this module is the exact opposite of the newdocker_container_copy_out
moduleNote: You probably don't need to worry about having ALL integration tests in the repo pass - only the new tests that you create. Some of the other tests may not pass locally - that's OK, we'll check them against a specialized environment using GitHub actions after you push your changes up.
ansible-test integration
does let you pass the name of a specific test to run. It will expect the name of the folder your test/role lives in - so it should be:ansible-test integration docker_container_copy_out
.There are some other methods mentioned in the Medium article (Locally, SSH) - but you may find it easiest to run the tests using Docker containers as supported by
ansible-test
.If you want to do that, I would probably recommend:
ansible-test
is installed)ansible-test integration --docker
from the project's folderPlease let me know if you have any questions!