Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce notification service delay for first scan in workflow scripts #530

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions tests_scripts/workflows/jira_workflows.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from tests_scripts.workflows.workflows import Workflows
from tests_scripts.workflows.utils import (
get_env,
NOTIFICATIONS_SVC_DELAY_FIRST_SCAN,
EXPECTED_CREATE_RESPONSE,
JIRA_PROVIDER_NAME,
SECURITY_RISKS,
SECURITY_RISKS_ID,
VULNERABILITIES,
SEVERITIES_CRITICAL,
SEVERITIES_HIGH,
SEVERITIES_MEDIUM,
VULNERABILITIES_WORKFLOW_NAME_JIRA,
Expand Down
4 changes: 1 addition & 3 deletions tests_scripts/workflows/slack_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@

from tests_scripts.workflows.utils import (
get_env,
NOTIFICATIONS_SVC_DELAY,
NOTIFICATIONS_SVC_DELAY_FIRST_SCAN,
EXPECTED_CREATE_RESPONSE,
SLACK_CHANNEL_NAME,
SECURITY_RISKS,
SECURITY_RISKS_ID,
VULNERABILITIES,
SEVERITIES_CRITICAL,
SEVERITIES_MEDIUM,
SEVERITIES_HIGH,
VULNERABILITIES_WORKFLOW_NAME_SLACK,
Expand Down Expand Up @@ -96,7 +94,7 @@ def start(self):

Logger.logger.info('Stage 7: Trigger first scan')
self.backend.create_kubescape_job_request(cluster_name=self.cluster, framework_list=[self.fw_name])
TestUtil.sleep(NOTIFICATIONS_SVC_DELAY, "waiting for first scan to be saved in notification service")
TestUtil.sleep(NOTIFICATIONS_SVC_DELAY_FIRST_SCAN, "waiting for first scan to be saved in notification service")


Logger.logger.info('Stage 8: Apply second deployment')
Expand Down
3 changes: 0 additions & 3 deletions tests_scripts/workflows/teams_workflows.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from tests_scripts.workflows.workflows import Workflows
from tests_scripts.workflows.utils import (
get_env,
NOTIFICATIONS_SVC_DELAY,
NOTIFICATIONS_SVC_DELAY_FIRST_SCAN,
EXPECTED_CREATE_RESPONSE,
TEAMS_CHANNEL_NAME,
SECURITY_RISKS,
SECURITY_RISKS_ID,
VULNERABILITIES,
SEVERITIES_CRITICAL,
SEVERITIES_MEDIUM,
SEVERITIES_HIGH,
VULNERABILITIES_WORKFLOW_NAME_TEAMS,
Expand Down Expand Up @@ -110,7 +108,6 @@ def start(self):

Logger.logger.info('Stage 11: Trigger second scan')
self.backend.create_kubescape_job_request(cluster_name=self.cluster, framework_list=[self.fw_name])
# TestUtil.sleep(NOTIFICATIONS_SVC_DELAY, "waiting for first scan to be saved in notification service")

Logger.logger.info('Stage 12: Assert all messages sent')
self.assert_messages_sent(before_test_message_ts, self.cluster)
Expand Down
2 changes: 1 addition & 1 deletion tests_scripts/workflows/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


# tests constants
NOTIFICATIONS_SVC_DELAY_FIRST_SCAN = 7 * 60
NOTIFICATIONS_SVC_DELAY_FIRST_SCAN = 2 * 60
NOTIFICATIONS_SVC_DELAY = 7 * 60

# severity levels
Expand Down
Loading