Extend project_id in object dicts (Newton only)
This is a work-around for bug 1630748 that can be backported to
stable/newton. This workaround will be reverted in Ocata and replaced
by a proper fix.
Partial-Bug: #1630748
Change-Id: I4ec9340094bc51cd8aa6e5112bf8114aa26c2982
diff --git a/neutron/tests/tempest/api/test_trunk.py b/neutron/tests/tempest/api/test_trunk.py
index 3dc8f0d..6763517 100644
--- a/neutron/tests/tempest/api/test_trunk.py
+++ b/neutron/tests/tempest/api/test_trunk.py
@@ -100,6 +100,17 @@
self.client.delete_trunk(trunk_id)
self.assertRaises(lib_exc.NotFound, self._show_trunk, trunk_id)
+ @test.idempotent_id('8d83a6ca-662d-45b8-8062-d513077296aa')
+ @test.requires_ext(extension="project-id", service="network")
+ def test_show_trunk_has_project_id(self):
+ trunk = self._create_trunk_with_network_and_parent(None)
+ body = self._show_trunk(trunk['trunk']['id'])
+ show_trunk = body['trunk']
+ self.assertIn('project_id', show_trunk)
+ self.assertIn('tenant_id', show_trunk)
+ self.assertEqual(self.client.tenant_id, show_trunk['project_id'])
+ self.assertEqual(self.client.tenant_id, show_trunk['tenant_id'])
+
@test.idempotent_id('4ce46c22-a2b6-4659-bc5a-0ef2463cab32')
def test_create_update_trunk(self):
trunk = self._create_trunk_with_network_and_parent(None)