-
Notifications
You must be signed in to change notification settings - Fork 664
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
update goss verify.yml to allow to pass host to run on #1646
Conversation
b456261
to
cd49513
Compare
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.
Thanks for the PR! I'm finding it hard to understand your use case. Does this change cover a general case? Can you explain further? Are there any tests you can provide here?
.../verifier/goss/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/verify.yml
Outdated
Show resolved
Hide resolved
.../verifier/goss/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/verify.yml
Show resolved
Hide resolved
Hi, thank you for reviewing my PR :) I set up a stripped down, real world example of the roles we actually use in production. It's dumbed down to a default vhost returning 502, but it shows the purpose of this PR. https://github.com/loomsen/ansible-nginx-ha-cluster-pr-example Another scenario would be a master-slave databse setup, where you want to setup the replication with ansible, and have a side effect playbook run to make sure the failover is working. I hope this enlightens the dark. Does it? |
Signed-off-by: Norbert Varzariu <[email protected]>
Signed-off-by: Norbert Varzariu <[email protected]>
Signed-off-by: Norbert Varzariu <[email protected]>
Signed-off-by: Norbert Varzariu <[email protected]>
Signed-off-by: Norbert Varzariu <[email protected]>
Signed-off-by: Norbert Varzariu <[email protected]>
OK I changed |
Politely asking travis for a rebuild, the failure seems kind of random to me. |
Yeah, those seem like random failures, now it failed at a different step. |
Sorry that you're PR is sitting so long here @loomsen. Thanks for the further example. I've given some more time on this. If I understand it correctly, this PR solves two issues:
So yes, this definitely feels like something we need then. This PR is missing documentation for this change that would definitely make it more visible for other users. Also, can me perhaps use the more readable find module to replace the And finally, how to test this? It will be hard to have any sense of sureness without that. If there isn't something already available to help you write tests, please let us know and we better get to making that happen too! |
.../verifier/goss/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/verify.yml
Outdated
Show resolved
Hide resolved
Signed-off-by: Norbert Varzariu <[email protected]>
depends on #1695 |
Only linter fails, which is addressed in #1695 |
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 is looking great now @loomsen!
.../verifier/goss/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/verify.yml
Show resolved
Hide resolved
Signed-off-by: Norbert Varzariu <[email protected]>
I don't know why the builds fail. After fetching latest master into my develop branch, some jobs also start failing. https://travis-ci.com/loomsen/molecule/builds/98581045 Hence I think the failures are unrelated to my changes. |
Added to agenda in ansible/community#427. Please join if you have time! |
Thanks for your patience @loomsen. Our CI is back in shape. It reported: https://travis-ci.com/ansible/molecule/jobs/179293976
|
Just missing the |
Gah, every single time. |
- add trailing dot to goss bin shasum to follow current style Signed-off-by: Norbert Varzariu <[email protected]>
Signed-off-by: Norbert Varzariu <[email protected]>
Signed-off-by: Norbert Varzariu <[email protected]>
Woohoo, finally :) |
Oh no .... we still didn't merge this .... @loomsen, can you resolve the final merge conflicts? (sorry 🙏). We're waiting on one final issue wrt. packaging and then we can merge this (for real). 😅 |
OK, so I pulled in the latest changes. Code style check fails, which shouldn't be related to this PR, and also a test randomly fails at destroy stage, maybe one of you could re-run just this build, if possible? @decentral1se thanks for bearing with me :) |
No, thank you!!! |
It appears to be related to #1911! I'm re-running the CI and will merge if it passes 👍 |
This PR allows for the goss verifier to run different tests on certain hosts.
Example: have a side-effect playbook, which makes keepalived move an IP to a different host in an active-active scenario. The verifier should verify that the IP actually moved to a different host, and that the side-effect playbook killed the supervised process.
Basically what you can do with testinfra by specifying the host in .get_hosts
You can do this for goss by prepending the test file with test_host_$hostname_as_given_in_molecule.yml.
PR Type