From d164c5bfc57a1dcf2410ac7dd87ffa7ab3e278d2 Mon Sep 17 00:00:00 2001 From: Ievgen Zapolskyi Date: Mon, 16 Dec 2019 18:34:51 +0200 Subject: [PATCH] if dummy-appliance option is set, it will cause setting collect-only by default --- cfme/test_framework/appliance.py | 3 +++ cfme/utils/dockerbot/pytestbase/setup.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cfme/test_framework/appliance.py b/cfme/test_framework/appliance.py index 0a73317155..4bc0008e6d 100644 --- a/cfme/test_framework/appliance.py +++ b/cfme/test_framework/appliance.py @@ -53,6 +53,9 @@ def pytest_configure(config): appliances = [ DummyAppliance.from_config(config) for _ in range(config.getoption('--num-dummies')) ] + if not config.option.collectonly: + config.option.collectonly = True + reporter.write_line('Retrieved Dummy Appliance', red=True) elif stack.top: appliances = [stack.top] diff --git a/cfme/utils/dockerbot/pytestbase/setup.sh b/cfme/utils/dockerbot/pytestbase/setup.sh index ce889b2a25..6118767217 100755 --- a/cfme/utils/dockerbot/pytestbase/setup.sh +++ b/cfme/utils/dockerbot/pytestbase/setup.sh @@ -260,7 +260,7 @@ set +e if [ "$USE_SPROUT" = "yes" ]; then log "invoking complete collectonly with dummy instance before test" - gate "collectonly.txt" "py.test --collectonly --dummy-appliance --dummy-appliance-version $SPROUT_GROUP --use-provider complete" + gate "collectonly.txt" "py.test --collect-only --dummy-appliance --dummy-appliance-version $SPROUT_GROUP --use-provider complete" run_n_log "miq sprout checkout --populate-yaml --user-key sprout" & sleep 5 @@ -268,7 +268,7 @@ then else log "no sprout used" log "invoking complete collectonly with given appliance instance before test" - gate "collectonly.txt" "py.test --collectonly --use-provider complete" + gate "collectonly.txt" "py.test --collect-only --use-provider complete" fi if [ "$GATE_RHEV" = "yes" ]