I'm developing a new cloudify plugin that I test using tox, nosetests and @workflow_test decorator following the plugin template.
I'd like to test the plugin interacting with another plugin (speficially openstack plugin). Hence I'm using a blueprint that imports my plugin (test yaml file) and the openstack yaml file, and then defines some nodes from my plugin and from openstack.
The problem is that I'm getting module python import errors as the openstack plugin is not found in the test environment created by tox/nosetests. I tried installing the plugin using wagon before running nosetests, but the installation fails.
Anyone could indicate me how to do that?
Have you tried requirements files? In your tox.ini file, you should be able to define your test requirements like this:
[testenv:py27]
deps =
-rdev-requirements.txt
-rtest-requirements.txt
Then put either the URL of the branch zip (such as master) in your test-requirements.txt
file:
https://github.com/cloudify-cosmo/cloudify-openstack-plugin/archive/master.zip
nose>=1.3
tox
In general, I find the workflow_test
not to be very useful, and usually I end up writing something else for the same purpose. For example, these functions basically do the same thing in this test base:
https://github.com/cloudify-incubator/cloudify-ecosystem-test/blob/791f02a27313ac0b63b029c66ead333cb17c4d9c/ecosystem_tests/init.py#L100
https://github.com/cloudify-incubator/cloudify-ecosystem-test/blob/791f02a27313ac0b63b029c66ead333cb17c4d9c/ecosystem_tests/init.py#L151
https://github.com/cloudify-incubator/cloudify-ecosystem-test/blob/791f02a27313ac0b63b029c66ead333cb17c4d9c/ecosystem_tests/init.py#L225