From 077fd3d19864fd945554ff7a019658d618f7fb27 Mon Sep 17 00:00:00 2001 From: agireesh Date: Mon, 11 Mar 2024 20:43:00 +0530 Subject: [PATCH] Bump test microversion and fix backup test We added new field "backup_type" in share-backups API in 2.85. Change-Id: Iaaf3c3914089ad0d27b61a524f14353cae35c4d5 Signed-off-by: Goutham Pacha Ravi --- manila_tempest_tests/config.py | 2 +- manila_tempest_tests/tests/api/test_backup.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manila_tempest_tests/config.py b/manila_tempest_tests/config.py index 0a98ad5a..aebf4a9c 100644 --- a/manila_tempest_tests/config.py +++ b/manila_tempest_tests/config.py @@ -40,7 +40,7 @@ ShareGroup = [ "This value is only used to validate the versions " "response from Manila."), cfg.StrOpt("max_api_microversion", - default="2.82", + default="2.85", help="The maximum api microversion is configured to be the " "value of the latest microversion supported by Manila."), cfg.StrOpt("region", diff --git a/manila_tempest_tests/tests/api/test_backup.py b/manila_tempest_tests/tests/api/test_backup.py index f4438025..40c48ace 100644 --- a/manila_tempest_tests/tests/api/test_backup.py +++ b/manila_tempest_tests/tests/api/test_backup.py @@ -54,11 +54,14 @@ class ShareBackupTest(base.BaseSharesMixedTest): def test_create_share_backup(self): backup = self.create_backup_wait_for_active(self.share_id) - # Verify backup create API response + # Verify backup create API response, we use the configured max API + # version to make this call expected_keys = ["id", "share_id", "status", "availability_zone", "created_at", "updated_at", "size", "progress", "restore_progress", "name", "description"] + if utils.is_microversion_ge(CONF.share.max_api_microversion, '2.85'): + expected_keys.append("backup_type") # Strict key check actual_backup = self.shares_v2_client.get_share_backup(