-
Notifications
You must be signed in to change notification settings - Fork 165
[1LP][RFR] New Test: Testing ansible service with quota enablement #9803
Conversation
1d45e9b
to
07e809f
Compare
82bc35f
to
1abcd21
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.
Few optional suggestions but LGTM otherwise..
def set_roottenant_quota(request, appliance): | ||
roottenant = appliance.collections.tenants.get_root_tenant() | ||
field, value = request.param | ||
roottenant.set_quota(**{'{}_cb'.format(field): True, field: value}) |
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.
How about using f-string here?
yield | ||
# will refresh page as navigation to configuration is blocked if alerts are on the page | ||
appliance.server.browser.refresh() | ||
roottenant.set_quota(**{'{}_cb'.format(field): False}) |
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.
How about using f-string here?
bundle_name, description="catalog_bundle", | ||
display_in=True, catalog=catalog, |
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 formatting here?
1abcd21
to
d4bc769
Compare
I detected some fixture changes in commit d4bc769 The local fixture
The local fixture
Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃 |
pytestmark = [ | ||
test_requirements.automate, | ||
pytest.mark.provider([AnsibleTowerProvider], scope='module'), | ||
pytest.mark.usefixtures('setup_provider') |
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 is a function scoped fixture, your provider marker is module scoped. Is this intentional? It will remove/add the provider between test cases in the module. Right now there's one provider parametrized by our current configs, but when there are more this will cause a performance hit.
Purpose or Intent
PRT Run
{{ pytest: cfme/tests/automate/test_ansible_tower_automate.py -k 'test_quota_for_ansible_service' --use-template-cache -qsvvv --use-provider=complete }}