-
Notifications
You must be signed in to change notification settings - Fork 170
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
adding molecule tests #138
Comments
Unless someone is already doing this I'm willing to give it a try. |
I was thinking the same. I'm actually using Test-Kitchen (https://kitchen.ci) atm. |
@paulcalabro yes. With the upside that molecule is now widely adopted as a test method for roles since it became part of the ansible project. |
Happy to learn something new. If folks are onboard, let's give it a whirl! |
One thought I just had is testing across Wazuh projects, like Wazuh Puppet. It might make sense to use something that supports multiple configuration mgmt languages. Might not matter. Either way works for me. |
FWIW we use both test-kitchen and molecule for testing our ansible work https://github.com/gsa/datagov-deploy. While test-kitchen is great for testing puppet/chef and that yes it does support ansible; molecule is much better at running with a docker based setup and is purpose-built for ansible as we've learned through using both. If you decide to go with test-kitchen here are some great examples of using test-kitchen to support multiple configuration management solutions: https://github.com/dev-sec If that PR is useful happy to work more on it |
Thanks for the insight as well as sharing those repos @JJediny. I'll make sure to check them out. Also, I had no idea about data.gov. That's pretty awesome. I think I might have some fun with that! |
Hello @paulcalabro, @JJediny and @singuliere , We're planning to add tests on each repository ( Cheers |
Hi @manuasir Is there a way/need that I can help/assist with adding I know my Ossec roles needs some love as well, but maybe https://github.com/dj-wasabi/ansible-ossec-agent/tree/master/molecule/default and https://github.com/dj-wasabi/ansible-ossec-server/tree/master/molecule/default helps? |
Hello @dj-wasabi , You're always welcome to open a new PR adding new improvements, features, and tests. We're currently testing this PR #151 , if you wanted to add more tests to it, it would be really awesome. Thanks! |
Hi @singuliere / @manuasir Do you want to use a single scenario (With several containers started, where all of the roles are applied on) or multiple ones (A scenario for each role for example) with Molecule. But I will create a PR, it might be a "big" one to make sure you can run Molecule without any errors (Seems some linting issues, some packages are not installed while they are required, etc). |
Thanks @dj-wasabi ! It could be interesting to explore the idea of having multiple scenarios, but any contribution of your choice will be much appreciated. |
I think we can already close this issue. Don't hesitate to open a new issue whenever you may consider it. Regards |
It would be convenient to have molecule scenarios to verify the roles works as expected. Such scenarios could run on every pull request via Travis CI and reduce the works required from reviewers.
The text was updated successfully, but these errors were encountered: