Skip to content

Commit

Permalink
Implement wait mechanism for security risk report retrieval in Jira i…
Browse files Browse the repository at this point in the history
…ntegration
  • Loading branch information
kooomix committed Jan 1, 2025
1 parent 9c7b093 commit 1d7f887
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests_scripts/helm/jira_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,15 @@ def get_posture_resource(self):

def create_jira_issue_for_security_risks(self):
security_risk_id = "R_0011"
resource = self.get_security_risks_resource(security_risk_id)

resource, t = self.wait_for_report(
timeout=120,
sleep_interval=10,
report_type=self.backend.get_security_risks_list,
security_risk_id=security_risk_id,
)

# resource = self.get_security_risks_resource(security_risk_id)
resourceHash = resource['k8sResourceHash']

Logger.logger.info(f"Create Jira issue for resource {resourceHash} and security_risk_id {security_risk_id}")
Expand Down

0 comments on commit 1d7f887

Please sign in to comment.