Skip to content

Commit

Permalink
fix(sct): raise errors where it should be raised
Browse files Browse the repository at this point in the history
raise errors where it should be raised but don't
  • Loading branch information
temichus committed Jan 15, 2025
1 parent c474310 commit c22fba4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion artifacts_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def verify_users(self):
datetime_user_created = datetime.datetime.strptime(datetime_str.group(1), datetime_format)
self.log.info("User '%s' created at '%s'", user, datetime_user_created)
if datetime_user_created < instance_start_time and not user == "centos":
AssertionError("User %s was created in the image. Only user centos should exist in the image")
raise AssertionError("User %s was created in the image. Only user centos should exist in the image")
else:
raise AssertionError(f"Unable to parse/find timestamp of the user {user} creation in {line}")
self.log.info("All users except image user 'centos' were created after the boot.")
Expand Down
4 changes: 2 additions & 2 deletions upgrade_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ def test_custom_profile_sequential_rolling_upgrade(self):
def prepare_data_before_upgrade(self):
InfoEvent(message='Running a prepare load for the initial custom data').publish()
if not (prepare_cs_user_profiles := self.params.get('prepare_cs_user_profiles')):
SyntaxError("Parameter 'prepare_cs_user_profiles' is not supplied")
raise SyntaxError("Parameter 'prepare_cs_user_profiles' is not supplied")

user_profiles, duration_per_cs_profile = self.parse_cs_user_profiles_param(prepare_cs_user_profiles)
stress_before_upgrade = self.run_cs_user_profiles(cs_profiles=user_profiles,
Expand All @@ -1504,7 +1504,7 @@ def prepare_data_before_upgrade(self):

# write workload during entire test
if not (cs_user_profiles := self.params.get('cs_user_profiles')):
SyntaxError("Parameter 'cs_user_profiles' is not supplied")
raise SyntaxError("Parameter 'cs_user_profiles' is not supplied")

return cs_user_profiles

Expand Down

0 comments on commit c22fba4

Please sign in to comment.