podman-compose
podman-compose copied to clipboard
Unify tests and run by CI
I have noticed that the project does not contain any automated tests. tests/
directory contains tests cases made of a docker-compose.yaml
and description of how to run the test manually and what is the expected output.
It would be awesome to have an automated test suite, that can be executed by the CI on each change. I think what currently is described in README.md of each test case, can be scripted in python.
Example
The current tests/deps
directory description:
podman-compose run --rm sleep /bin/sh -c 'wget -O - http://localhost:8000/hosts'
could be replaced with something similar to this code:
def test_deps():
with podman_compose_run("--rm", "sleep", "/bin/sh", "-c", "wget -O - http://localhost:8000/hosts"):
# web service should be started by the sleep service.
requests.get('http://localhost:8000')
why is this closed?
this is a very valid point. I'll reopen it
Would it make sense if I have created a proposal/example test to show how it could work? I would create a pull request with python code for this.
I've activated pytests on pytests/*.py
Those are intended to be unit tests of python methods (no actual creation of containers)
I want to add more tests that involves actually launching containers For that I want github-hosted actions which seems limited to ubuntu (I prefer fedora) I want to a way to install modern podman 3.4 or more on github hosted work flows
I've started getting GitLab CI running over here: https://gitlab.com/mikeklem/python-podman-compose/
I think this is no longer relevant as we have a number of test cases in tests/
subdirectory. These are run as part of Github CI.
I will close this issue, but please reopen it if you think my reasoning is invalid.