-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add molecule tests #20
Conversation
5a1fbb8
to
4191368
Compare
Thank you! Should we use geerlingguy/docker-debian11-ansible container image or create a new one so we keep control of the dependencies? I can create one for Debian and another one based on maybe redhat/ubi8 and host them on quay.io. |
I have no preference for the source of the container used by Molecule. If if has systemd, it should work fine. That said, I do have some hosted at my GitLab:
If this PR gets merged, the next one will actually use a GitHub actions matrix, and the containers will be defined there. If all testable containers come from the same "namespace", the matrix definition gets "cleaner" (see example here for the definition here). But, again, it is up to you. If you do host your own test containers, please send me the fully qualified image name so I can change it here 🙂 |
Ok, I have new container images we could use for testing.
Their Dockerfiles are in the build folder. You can trigger a new version of the images by modifying the version.json file. {"version":"v0.1.0"} This way we have full control and visibility from this repository on the dependencies considered for testing. The Red Hat image might not work initially, I did my best to port everything on the Debian one there, but I might need to fine tune it. |
Thanks for the links. I've updated the PR to use your Debian image. For Red Hat, I'll add it when I create the build matrix (next PR after this one is merged). Then I can ensure it is working fine :) I'll rebase this PR and force-push it to add Edit: rebased and ready for review. |
a7bb8e8
to
3260381
Compare
Thank you @parcimonic |
This is the first PR for #19.
I've tested the Molecule settings in both Arch Linux and Ubuntu 22.04 (Vagrant VM).
I didn't want to change too much stuff in the role code to avoid having a larger PR. This is why I'm using "bogus" values for the Grafana auth variables. I plan on submitting changes to the agent template so we can avoid having calls to Grafana cloud without proper authentication values (in the future, after testing framework is in place).
However, I had to fix the systemd service file template, otherwise it would never start correctly.
Edit: this fixes #17.
I chose to use Podman instead of Docker because that's what I'm using to test my own roles. I can revert to Docker if you want me to.