Fix failing subnet test on stable/2023.1 branch
We haven't added tests for share network subnet
metadata yet, howver, if you set the max_microversion
to the version supported by the server in stable/2023.1 (2.78),
one of the tests fails since the API responds with
the new "metadata" key.
Change-Id: I9d2bba8d87643abfc626346427e90569d9ed7a3e
Partially-implements: bp/metadata-for-share-resources
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
diff --git a/manila_tempest_tests/tests/api/test_share_network_subnets.py b/manila_tempest_tests/tests/api/test_share_network_subnets.py
index da3d5ee..a16dd3c 100644
--- a/manila_tempest_tests/tests/api/test_share_network_subnets.py
+++ b/manila_tempest_tests/tests/api/test_share_network_subnets.py
@@ -75,6 +75,8 @@
"updated_at", "segmentation_id", "availability_zone", "gateway",
"share_network_id", "mtu"
]
+ if utils.is_microversion_ge(CONF.share.max_api_microversion, '2.78'):
+ keys.extend('metadata')
# Default subnet was created during share network creation
self.assertIsNone(default_subnet['availability_zone'])