From c474310d5b21317f51eeb545ddfcb389534f6376 Mon Sep 17 00:00:00 2001 From: Artsiom Mishuta Date: Wed, 15 Jan 2025 13:12:21 +0100 Subject: [PATCH] fix(sla.py): raise value error in file sla.py valuse error objects creating but not raised. this PR fix this. --- test_lib/sla.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test_lib/sla.py b/test_lib/sla.py index 62cf8a2557..7edab3b3eb 100644 --- a/test_lib/sla.py +++ b/test_lib/sla.py @@ -373,12 +373,12 @@ def validate_role_service_level_attributes_against_db(self): service_level = self.list_user_role_attached_service_levels() LOGGER.debug("List of service levels for role %s: %s", self.name, service_level) if not service_level and self.attached_service_level: - ValueError(f"No Service Level attached to the role '{self.name}'. But it is expected that Service Level " - f"'{self._attached_service_level_name}' is attached to this role. Validate if it is test or " - "Scylla issue") + raise ValueError(f"No Service Level attached to the role '{self.name}'. But it is expected that Service Level " + f"'{self._attached_service_level_name}' is attached to this role. Validate if it is test or " + "Scylla issue") elif not self.attached_service_level and service_level: - ValueError(f"Found attached Service Level '{service_level[0].service_level}' to the role '{self.name}'. " - "But it is expected that no attached Service Level. Validate if it is test or Scylla issue") + raise ValueError(f"Found attached Service Level '{service_level[0].service_level}' to the role '{self.name}'. " + "But it is expected that no attached Service Level. Validate if it is test or Scylla issue") elif not service_level and not self.attached_service_level: LOGGER.debug("No attached Service level to the role %s", self.name) return @@ -389,12 +389,12 @@ def validate_role_service_level_attributes_against_db(self): db_service_level = self.attached_service_level.list_service_level() LOGGER.debug("db_service_level: %s", db_service_level) if db_service_level.shares != self.attached_service_level_shares: - ValueError(f"Found attached Service Level '{service_level[0].service_level}' to the role '{self.name}' " - f"with {db_service_level.shares} shares. Expected {self._attached_service_level_shares} " - f"shares. Validate if it is test or Scylla issue") + raise ValueError(f"Found attached Service Level '{service_level[0].service_level}' to the role '{self.name}' " + f"with {db_service_level.shares} shares. Expected {self._attached_service_level_shares} " + f"shares. Validate if it is test or Scylla issue") else: - ValueError(f"Found attached Service Level '{service_level[0].service_level}' to the role '{self.name}'. " - "But it is expected that no attached Service Level. Validate if it is test or Scylla issue") + raise ValueError(f"Found attached Service Level '{service_level[0].service_level}' to the role '{self.name}'. " + "But it is expected that no attached Service Level. Validate if it is test or Scylla issue") class User(UserRoleBase):