-
Notifications
You must be signed in to change notification settings - Fork 165
[1LP][RFR] Add comparison of OS data after revert to test_verify_revert_snapshot #10176
Conversation
How do we want to add this functionality? Do we want to:
|
@prichard77 I think the current implementation is good. If we want to add this check to other test cases then maybe option (2) or (3) would be appropriate. But if this is the only place where we want to check the OS info, then option (1) is the way to go imo. |
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.
Two questions about removing the comments, otherwise LGTM 👍
|
||
@property | ||
def is_displayed(self): | ||
expected_title = '"OS Info" for Virtual Machine "{}"'.format(self.context['object'].name) |
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.
Please use f string
here
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.
I try to use f string and was wondering why it wasn't used here, until I tried to implement it. There are too many quotes. I started down the escape character route, but that makes things real ugly. If you have an easier solution, let me know. The 'object' quotes would need to be inside on double quotes and the entire string is inside of single. We need 3 types of quotes.
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.
@prichard77 I think you could split it into steps
name = self.context['object'].name
expected_title = f'"OS Info" for Virtual Machine "{name}"'
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.
Sure, but is this really better than the old format?
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.
I went ahead and updated to f' .
PRT did not run any tests, @prichard77 can you look into why |
Looking into why nothing ran in PRT. Tests were deselected. I am looking into why now. |
I really with the PRT messages/logs were clearer on what exactly is happening. There is a blocker for rhv providers but vsphere is not blocked. However, when I try to run vsphere locally I get an error trying to setup the provider. |
I believe the PRT issue was that I was missing --long-running. I also made another update to the markers to only use vsphere providers. I originally had a blocker marker for just rhv providers, but the BZ was closed WONTFIX . The bug only occurs for rhv. |
blockers=[BZ(1805803, unblock=lambda provider: not provider.one_of(RHEVMProvider), | ||
ignore_bugs={1745065})], automates=[1805803]) | ||
@pytest.mark.rhv1 | ||
@pytest.mark.provider([VMwareProvider]) |
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.
I think if we're going to remove RHV from the parametrization here, we should include comments concerning the BZ's, the fact that they aren't getting fixed, etc.
The other option here is to use pytest.mark.uncollectif
, evaluating the provider type and BZ blocking status to uncollect the test case instead of skipping it.
This will make it so the test case isn't collected and included in reports, when it will not get fixed, instead of just being skipped at runtime.
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.
Uncollectif added.
…rt_snapshot (ManageIQ#10176) * Add comparison of OS data after revert to test_verify_revert_snapshot * Added verify_revert_snapshot() back into test. Had been removed for testing * Add verification of OS data in OS view * Create navigation to InfraVmOsView and add to test_verify_revert_snapshot * Remove and update comments * Remove more comments * Update format of expected_title * Remove blocker marker and add one to use only vsphere providers * Update marker for test_verify_revert_snapshot
Purpose or Intent
PRT Run
{{ pytest: --long-running cfme/tests/infrastructure/test_snapshot.py::test_verify_revert_snapshot }}