-
Notifications
You must be signed in to change notification settings - Fork 165
[1LP][RFR] - Removing duplicate tc #9966
[1LP][RFR] - Removing duplicate tc #9966
Conversation
a025231
to
56328f8
Compare
56328f8
to
f236435
Compare
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.
This test is collected twice, once for RHEV provider and once for VMWare provider. I think testing it against a single provider will be enough. And this will also resolve your need to delete the service request for a successful test execution if that is the reason why you're deleting the service request.
|
||
|
||
@pytest.mark.tier(2) | ||
@pytest.mark.meta(coverage=[1380197]) |
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.
Use automates
instead of coverage
.
# Remove Request | ||
request_description = "Provisioning Service [{name}] from [{name}]".format( | ||
name=generic_catalog_item.name | ||
) | ||
service_request = appliance.collections.requests.instantiate( | ||
description=request_description, partial_check=True | ||
) | ||
|
||
request.addfinalizer(lambda: service_request.remove_request(method="rest")) |
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 don't see the need to delete this service request, but if you must do it, you can directly put this inside a finalize block(outside the with
block) like this -
@request.addfinalizer
def _finalize():
# Remove Request
request_description = "Provisioning Service [{name}] from [{name}]".format(
name=generic_catalog_item.name
)
service_request = appliance.collections.requests.instantiate(
description=request_description, partial_check=True
)
service_request.remove_request(method="rest")
Test to check is there have pending email approval status or not in log file after | ||
ordering service catalog | ||
Bugzilla: | ||
1380197 |
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.
Can you fix indentation here?
service_request = service_catalogs.order(wait_for_view=30) | ||
|
||
# Remove Request | ||
request_description = "Provisioning Service [{name}] from [{name}]".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.
Use f-string instead of format.
54f4974
to
7e4d654
Compare
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.
Thanks for the changes, I still have one more request.
|
||
|
||
@pytest.mark.tier(2) | ||
@pytest.mark.provider([VMwareProvider], scope="module") |
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.
@pytest.mark.provider([VMwareProvider], scope="module") | |
@pytest.mark.provider([InfraProvider], scope="module", selector=ONE) |
This will create test like - test_xyz[virtualcenter-datastore]
The test currently has a name like test_xyz[virtualcenter-6.5-datastore]
. If the name of this provider changes, the test ID and name will also change which we want to avoid as fas as possible.
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.
@dgaikwad I agree with @valaparthvi here, we should change this to InfraProvider
There is
|
|
||
@pytest.mark.tier(2) | ||
@pytest.mark.provider([VMwareProvider], scope="module") | ||
@pytest.mark.meta(automate=[1380197]) |
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.
@pytest.mark.meta(automate=[1380197]) | |
@pytest.mark.meta(automates=[1380197]) |
7e4d654
to
2205e08
Compare
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.
1 small change, otherwise LGTM
|
||
|
||
@pytest.mark.tier(2) | ||
@pytest.mark.provider([VMwareProvider], scope="module") |
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.
@dgaikwad I agree with @valaparthvi here, we should change this to InfraProvider
LGTM @valaparthvi can we move this one to 1LP? |
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.
As @JaryN pointed out, I think this is duplicated test coverage for something that is already automated, and this test case should not be added.
pending_from = normalize_text("{} request from {}pending approval".format(vm_type, requester)) |
In the existing test case, provision approval is set to manual, and we're asserting against the smtp queue that a pending approval email is sent.
This test case can be covered by simply adding the LogValidator to the existing test, after the SMTP check.
matched_patterns=[ | ||
( | ||
r'INFO.*Invoking \[builtin\] method \[/\$/Object/send_email\] with ' | ||
r'inputs.*Service Request from Pending Approval' |
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.
This looks like its actually missing the from value? Is there a bug with CFME logging 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.
@mshriver I reported this issue for some infra provider at first. They fixed only for Infra and I didn't bother to verify with some other by hand, but I think meanwhile hard-coded exception for cloud providers was added. I have no idea why the person putting it there did that.
I hope after BZ 1818172 is closed, all providers will behave the same.
Note there is ongoing PR I started recently: |
The bug is about message not being send. Although checking log message about email sent attempt may be considered enough, we are doing more in the test I am owner of. The test I am owner of is not making service request but just simple provisioning. I think though the service request is just some "wrapper" around normal provisioning and calls the exactly the same parts. I think it is not worthy to spend time on implementing the checking with service requests. Also, as I am mentioning in BZ 1818172, I think the email to users are quirky in setting up as I was unable to find a way how to specify the recipient address (@dgaikwad do you know? I think it is somewhere in automate). I have doubts that they are used in real-life. |
@JaryN Sorry but I am not aware of setting up recipient address |
c6d40df
to
87e180f
Compare
87e180f
to
a9c32bc
Compare
Purpose or Intent
PRT Run