Skip to content

Commit b776f70

Browse files
committed
Fix functional job failed
After Neutron patch I3c93818002c2d7753454547231ba08544b6fa1c0 merged, the default value of segment description is an empty string. This patch will determine whether the Neuron shim extension standard-attr-segment supported. Change-Id: I68a3c018f03e5bb53bd637844ac9d7742a765db0
1 parent 17448ad commit b776f70

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

openstackclient/tests/functional/network/v2/test_network_segment.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,20 @@ def test_network_segment_set_show(self):
113113
self.openstack,
114114
'network segment delete ' + name
115115
)
116-
self.assertIsNone(
117-
json_output["description"],
118-
)
116+
117+
extension_output = json.loads(self.openstack(
118+
"extension list -f json "
119+
))
120+
ext_alias = [x["Alias"] for x in extension_output]
121+
if "standard-attr-segment" in ext_alias:
122+
self.assertEqual(
123+
'',
124+
json_output["description"],
125+
)
126+
else:
127+
self.assertIsNone(
128+
json_output["description"],
129+
)
119130

120131
new_description = 'new_description'
121132
cmd_output = self.openstack(

0 commit comments

Comments
 (0)