Cleanup existing instances in setup for test_list_servers_negative.py
Change I8519cba1fcf6ff39d69839783d07359544509db5 was supposed to make
the setup for test_list_servers_negative.py handle the case that tempest
is being ran without tenant isolation, but it doesn't fix the entire
problem because it's only checking if the MULTI_USER global is False.
The MULTI_USER global is only False if allow_tenant_isolation=False and
user1 == user2. So if you're running tempest without tenant isolation
but you do have two separate users/tenants for running the tests, then
the setup can still fail.
This patch fixes the problem by always doing the cleanup if
allow_tenant_isolation=False regardless of what MULTI_USER is set to.
Closes-Bug: #1234370
Change-Id: I821e200d07c11ba04d8be788095b7648de1d820b
diff --git a/tempest/api/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py
index 983258d..9dd2e27 100644
--- a/tempest/api/compute/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/servers/test_list_servers_negative.py
@@ -37,7 +37,7 @@
blocks while the servers are being deleted.
"""
if len(servers):
- if not compute.MULTI_USER:
+ if not cls.config.compute.allow_tenant_isolation:
for srv in servers:
cls.client.wait_for_server_termination(srv['id'],
ignore_error=True)