-
Notifications
You must be signed in to change notification settings - Fork 164
[1LP][RFR] Fix VM retirement tests and test cleanup #10064
Conversation
925f0e4
to
1261ecd
Compare
def test_retire_vm_future(appliance, vm, from_collection): | ||
@pytest.mark.meta( | ||
automates=[BZ(1805119), BZ(1827787)], blockers=[BZ(1827787, forced_streams=["5.10", "5.11"])] | ||
) |
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.
Optional: you can remove BZ
from automates.
@@ -182,9 +182,9 @@ def test_reports_invalid_file(appliance, yaml_name): | |||
2. Import `invalid_yaml` yaml that has no yaml data. | |||
""" | |||
if yaml_name == "invalid_yaml": | |||
message = "Error during 'upload': undefined method `keys' for \"i\":String" | |||
message = r".*Error during .*upload.*: undefined method `keys.* for .*i.*:String.*" | |||
else: |
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.
Optional: Are you sure about spaces between words?
message = r".*Error during .*upload.*: undefined method `keys.* for .*i.*:String.*"
Can we write like this - message = r".*Error during.*upload.*: undefined method `keys.*for.*i.*:String.*"
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.
Yeah, I think it will be better to leave the space out. Thanks!
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.
What are we trying to fix here? using .*
is making this expression very greedy, if there's an issue with the number of whitespace characters in the string in the UI, we should use \s+
to express "one or more whitespace characters"
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.
LGTM :)
I detected some fixture changes in commit 28de40c4ac5122bca3db9fde9428fcb964a2b27f The local fixture
Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃 |
Purpose or Intent
selector
totest_add_provider_button_accordion
so that it doesn't extra tests.test_reports_invalid_file
which was failing because error message changed.PRT Run
{{ pytest: cfme/tests/infrastructure/test_vm_retirement_rest.py cfme/tests/intelligence/reports/test_import_export_reports_widgets.py::test_reports_invalid_file -vvv }}