Skip to content

Commit

Permalink
Merge pull request #528 from armosec/updatetests
Browse files Browse the repository at this point in the history
Improve assertion error messages in JiraIntegration for clarity
  • Loading branch information
kooomix authored Dec 10, 2024
2 parents 62770f8 + 971e58f commit 6e2a4bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests_scripts/helm/jira_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def verify_security_risks_resource_exists(self, security_risk_id):
response = json.loads(r.text)
if response["response"] is None:
response["response"] = []
assert len(response["response"]) == 1 , "Expected one resource for security risks"
assert len(response["response"]) == 1 , f"Expected one resource for security risks but got {response}"

def verify_security_risks_resource_missing(self, security_risk_id):
r = self.backend.get_security_risks_resources(cluster_name=self.cluster, namespace=self.namespace, security_risk_id=security_risk_id, other_filters={"tickets":"|missing"})
Expand All @@ -247,7 +247,7 @@ def get_security_risks_resource(self, security_risk_id, other_filters={}):
response = json.loads(r.text)
if response["response"] is None:
response["response"] = []
assert len(response["response"]) == 1 , "Expected one resource for security risks"
assert len(response["response"]) == 1 , f"Expected one resource for security risks but got {response}"
return response["response"][0]

def wait_for_vuln_results(self):
Expand Down

0 comments on commit 6e2a4bd

Please sign in to comment.