Add list the primary tenant
s1 and s2 belong to primary tenant. We have tests that can not list
the primary tenant due to odd specified behavior and tests that
can not list other tenants. But readers will be confused that whether
s1 and s2 indeed belong to primary tenant? We do not test that we
can list primary tenant with all_tenants specified. So I add this.
Change-Id: I8a6ec2b4994258fb530c9fba1ddbd8a48290e607
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index c9ffcca..efa55d5 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -106,6 +106,14 @@
self.assertNotIn(self.s1_name, servers_name)
self.assertNotIn(self.s2_name, servers_name)
+ # List the primary tenant with all_tenants is specified
+ params = {'all_tenants': '', 'tenant_id': tenant_id}
+ body = self.client.list_servers(detail=True, **params)
+ servers = body['servers']
+ servers_name = map(lambda x: x['name'], servers)
+ self.assertIn(self.s1_name, servers_name)
+ self.assertIn(self.s2_name, servers_name)
+
# List the admin tenant shouldn't get servers created by other tenants
admin_tenant_id = self.client.tenant_id
params = {'all_tenants': '', 'tenant_id': admin_tenant_id}