-
Notifications
You must be signed in to change notification settings - Fork 51
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
[WIP] Kitchen.ci test environment #31
base: master
Are you sure you want to change the base?
Conversation
https://kitchen.ci/ Kitchen CI helps testing infrastructure code. Since ipmininet supports various distributions kitchen.ci can help testing the provisioning scripts.
If you wanna try, you could install the ruby gem If the installation works, you do a |
Currently there are at least two issues with that PR:
I just created the PR to show you the kitchen workflow, so you can decide if it makes sense to add. |
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 could make sense. I don't know how to solve the build_vm.sh
stucked however.
Maybe this is due to the updates of the grub which require user interactions.
|
||
provisioner: | ||
name: shell | ||
command: /opt/ipmininet/util/build_vm.sh |
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.
command: /opt/ipmininet/util/build_vm.sh | |
command: /opt/ipmininet/util/build_vm.sh && sudo pytest -v /opt/ipmininet |
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.
Kitchen supplies a config section (verifiers) for running tests https://kitchen.ci/docs/getting-started/writing-test/. Separating the provisioning and the tests. I suggest adding the tests there.
|
||
provisioner: | ||
name: shell | ||
command: sudo python /opt/ipmininet/util/install.py -a |
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.
command: sudo python /opt/ipmininet/util/install.py -a | |
command: if which apt; then sudo apt install -y python; elif which yum; then sudo yum install -y python; fi; sudo python /opt/ipmininet/util/install.py -iam && sudo pytest -v /opt/ipmininet |
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 solves the problems for all platforms
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.
👍 for if which apt; then sudo apt install -y python; elif which yum; then sudo yum install -y python; fi; sudo python /opt/ipmininet/util/install.py -iam
For sudo pytest -v /opt/ipmininet
see #31 (comment)
@@ -1,3 +1,5 @@ | |||
#!/usr/bin/env python |
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.
It is not needed, I think
I would remove it
If this is due to that, adding |
https://kitchen.ci/
Kitchen CI helps testing infrastructure code. Since ipmininet supports
various distributions kitchen.ci can help testing the provisioning
scripts.