From 6c727562112b3ce0d75d7fecbb9414d92aa37049 Mon Sep 17 00:00:00 2001 From: Elena Bondarenko Date: Tue, 19 Nov 2024 16:23:42 +0100 Subject: [PATCH] Fix tests Signed-off-by: Elena Bondarenko --- tests/functional/ui/test_provider_client.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/functional/ui/test_provider_client.py b/tests/functional/ui/test_provider_client.py index 1e04f0d84b3..28d743b3363 100644 --- a/tests/functional/ui/test_provider_client.py +++ b/tests/functional/ui/test_provider_client.py @@ -29,7 +29,9 @@ class TestOnboardingTokenGenerationWithQuota(ManageTest): Test onboarding token generation when quota is specified """ - def test_token_generation_with_quota(self, quota_value=2, quota_tib=True): + def test_token_generation_with_quota( + self, setup_ui_class, quota_value=2, quota_tib=True + ): storage_clients = PageNavigator().nav_to_storageclients_page() token = storage_clients.generate_client_onboarding_ticket( quota_value=quota_value, quota_tib=quota_tib @@ -37,7 +39,7 @@ def test_token_generation_with_quota(self, quota_value=2, quota_tib=True): logger.info(f"Token generated. It begins with {token[:20]}") assert len(token) > 20, "Token is too short" - def test_quota_decrease_blocked(self): + def test_quota_decrease_blocked(self, setup_ui_class): """ Test that quota cannot be increased for a client: if a client has unlimited quota, it cannot be changed. @@ -59,7 +61,7 @@ def test_quota_decrease_blocked(self): new_value=new_quota, ) - def test_quota_increase(self): + def test_quota_increase(self, setup_ui_class): """ Test that quota can be increased in the UI for every client with limited quota both by manually setting a new value and by clicking Increment @@ -80,7 +82,7 @@ def test_quota_increase(self): client_cluster_name=client, increase_by_one=True ) - def test_available_capacity_in_quota_edit_popup(self): + def test_available_capacity_in_quota_edit_popup(self, setup_ui_class): """ Test that Quota edit popup shows correct value of Available capacity @@ -95,7 +97,7 @@ def test_available_capacity_in_quota_edit_popup(self): ceph_capacity_tib = ceph_capacity_bytes / 2**40 assert (ui_capacity_num - ceph_capacity_tib) ** 2 < 0.1 - def test_quota_values_in_ui(self): + def test_quota_values_in_ui(self, setup_ui_class): """ Test that all storage clients have correct quota value in the UI """