-
Notifications
You must be signed in to change notification settings - Fork 218
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 skip test logic when pika not installed #3057
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,17 @@ | |
from volttron.platform.instance_setup import _is_agent_installed | ||
from volttron.utils import get_hostname | ||
from volttron.platform.agent.utils import is_volttron_running | ||
from volttrontesting.fixtures.rmq_test_setup import create_rmq_volttron_setup | ||
from volttrontesting.utils.platformwrapper import create_volttron_home | ||
from volttron.platform import is_rabbitmq_available | ||
|
||
HAS_RMQ = is_rabbitmq_available() | ||
RMQ_TIMEOUT = 600 | ||
HAS_RMQ = is_rabbitmq_available() | ||
if HAS_RMQ: | ||
from volttrontesting.fixtures.rmq_test_setup import create_rmq_volttron_setup | ||
else: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The if part makes sense but in the else why should the entire module be skipped. The module has both rmq and zmq tests. |
||
pytest.skip("Pika is not installed", allow_module_level=True) | ||
|
||
from volttrontesting.utils.platformwrapper import create_volttron_home | ||
|
||
|
||
''' | ||
Example variables to be used during each of the tests, depending on the prompts that will be asked | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,13 @@ | |
from volttrontesting.utils.platformwrapper import PlatformWrapper | ||
from volttrontesting.fixtures.volttron_platform_fixtures import get_rand_vip, \ | ||
get_rand_ip_and_port | ||
from volttron.utils.rmq_setup import start_rabbit, stop_rabbit | ||
|
||
from volttron.platform import is_rabbitmq_available | ||
if is_rabbitmq_available(): | ||
from volttron.utils.rmq_setup import start_rabbit, stop_rabbit | ||
else: | ||
pytest.skip("Pika is not installed", allow_module_level=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, only the rmq test cases should be skipped. you can set a variable inside if and use that to skip the rmq test case alone |
||
|
||
from volttron.platform.agent.utils import execute_command | ||
|
||
|
||
|
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.
the create_vcfg_vhome method seem to be create a volttron home and nothing else. (The method should be name create_vhome )So I don't see why it should depend on pika install