From 27acb1d8a6fc6a26c27c109aa48462900553f41c Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Thu, 25 Apr 2024 11:42:52 +0800 Subject: [PATCH] test(robot): fix backupstore setup Signed-off-by: Yang Chiu --- e2e/libs/keywords/backupstore_keywords.py | 6 +++--- e2e/libs/utility/utility.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/libs/keywords/backupstore_keywords.py b/e2e/libs/keywords/backupstore_keywords.py index 297533d39f..34f15e8d8d 100644 --- a/e2e/libs/keywords/backupstore_keywords.py +++ b/e2e/libs/keywords/backupstore_keywords.py @@ -9,9 +9,9 @@ class backupstore_keywords: def __init__(self): backupstore = get_backupstore() - if backupstore == "s3": + if backupstore.startswith("s3"): self.backupstore = Minio() - elif backupstore == "nfs": + elif backupstore.startswith("nfs"): self.backupstore = Nfs() self.setting = Setting() @@ -23,7 +23,7 @@ def cleanup_backupstore(self): client = get_longhorn_client() self.backupstore.cleanup_system_backups(client) self.backupstore.cleanup_backup_volumes(client) - self.setting.reset_backupstore_setting() + self.setting.reset_backupstore() def create_dummy_in_progress_backup(self, volume_name): client = get_longhorn_client() diff --git a/e2e/libs/utility/utility.py b/e2e/libs/utility/utility.py index a22a8ca724..96154aea65 100644 --- a/e2e/libs/utility/utility.py +++ b/e2e/libs/utility/utility.py @@ -72,7 +72,7 @@ def init_k8s_api_client(): def get_backupstore(): - return os.environ.get('LONGHORN_BACKUPSTORE') + return os.environ.get('LONGHORN_BACKUPSTORE', "") def wait_for_cluster_ready():