Skip to content

Commit 5f75595

Browse files
[Test] change test for tags
1 parent f9ac675 commit 5f75595

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

otcextensions/tests/functional/sdk/apig/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,20 @@ def get_attrs(self):
3030
security_group = security_groups[0]
3131
available_zone_ids = ["eu-de-01"]
3232
nmb = uuid.uuid4().hex[:8]
33+
tags = [
34+
{
35+
"key": "check_this",
36+
"value": "mate"
37+
}
38+
]
3339
return {
3440
'instance_name': 'test_gateway_{}'.format(nmb),
3541
'spec_id': 'BASIC',
3642
'vpc_id': vpc.id,
3743
'subnet_id': subnet.id,
3844
'security_group_id': security_group.id,
3945
'available_zone_ids': available_zone_ids,
46+
'tags': tags
4047
}
4148

4249
def create_gateway(self):

otcextensions/tests/functional/sdk/apig/v2/test_tags.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313

1414

1515
class TestTags(TestApiG):
16-
gateway_id = "560de602c9f74969a05ff01d401a53ed"
1716

1817
def setUp(self):
1918
super(TestTags, self).setUp()
19+
self.create_gateway()
20+
21+
def tearDown(self):
22+
super(TestTags, self).tearDown()
23+
self.delete_gateway()
2024

2125
def test_list_tags(self):
22-
tags = list(self.client.tags(gateway=TestTags.gateway_id))
26+
tags = list(self.client.tags(gateway=TestTags.gateway))
2327
print("Tags:", tags)
2428
self.assertGreater(len(tags), 0, "No tags found")

0 commit comments

Comments
 (0)