Fix clean up for test_access_rules tests
In the test_access_rules tests [1], the app credentials were
created within setUp which means they were created per each test
while they weren't properly cleaned up after the tests. That led
to having those creds left behind which caused the assert issue
in the LP 1996624
This patch moves the app creds creation to the resource_setup so
that it's a class level resource and thus not created per each
test case separately. The test which tests deleting access rule
will create its own app cred together with a new access rule and
intead of asserting on number of found access rules it will check
existence of the access rule which was created in the test. That
will help us avoid any race conditions.
[1] https://opendev.org/openstack/tempest/src/commit/b2fefaf0b56ce96f6116f89faf79458ef4f9c7f3/tempest/api/identity/v3/test_access_rules.py#L51
Related-Bug: #1996624
Change-Id: Ibdb40910e53b3b1d5f481d101dfcf1b8e04dc63f
1 file changed