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

remove old registry scan tests #573

Merged
merged 1 commit into from
Jan 8, 2025
Merged
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
5 changes: 1 addition & 4 deletions configurations/system/tests_cases/registry_tests.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import inspect
from os.path import join

from systest_utils.statics import DEFAULT_NOTIFICATIONS_PATHS, DEFAULT_NOTIFICATIONS_DEPLOYMENT_PATH, \
DEFAULT_REGISTRY_PATHS
from tests_scripts.users_notifications.alert_notifications import get_messages_from_teams_channel, \
enrich_teams_alert_channel, get_messages_from_slack_channel, enrich_slack_alert_channel
from systest_utils.statics import DEFAULT_REGISTRY_PATHS
from .structures import TestConfiguration

class RegistryTests(object):
Expand Down
104 changes: 0 additions & 104 deletions configurations/system/tests_cases/vuln_scan_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,84 +110,6 @@ def vuln_scan_cve_global_namespace_exceptions():
helm_kwargs={"triggerNewImageScan": True},
)

@staticmethod
def vuln_scan_trigger_scan_public_registry():
from tests_scripts.helm.vuln_scan import VulnerabilityScanningRegistry
from systest_utils.statics import DEFAULT_DEPLOYMENT_PATH, DEFAULT_SERVICE_PATH
from os.path import join
return TestConfiguration(
name=inspect.currentframe().f_code.co_name,
test_obj=VulnerabilityScanningRegistry,
deployment=join(DEFAULT_DEPLOYMENT_PATH, "public-registry.yaml"),
service=join(DEFAULT_SERVICE_PATH, "public-registry.yaml"),
properties={'http': True}, # https://hub.armosec.io/docs/registry-vulnerability-scan
registry='local', # either local or specify the registry itself
configmap_data=None, # https://hub.armosec.io/docs/registry-vulnerability-scan
expected_results="nginx-new-image.json",
expected_payloads={"image": "nginx:test"},
is_https=False
)

@staticmethod
def vuln_scan_trigger_scan_public_registry_excluded():
from tests_scripts.helm.vuln_scan import VulnerabilityScanningRegistry
from systest_utils.statics import DEFAULT_DEPLOYMENT_PATH, DEFAULT_SERVICE_PATH
from os.path import join
return TestConfiguration(
name=inspect.currentframe().f_code.co_name,
test_obj=VulnerabilityScanningRegistry,

# This test is forced to use version 1.24.2 of the helm chart since this is the last version which supports the old registry scan API
# Please remove this test once the BE will stop supporting this functionality')
helm_branch="kubescape-operator-1.24.2",
deployment=join(DEFAULT_DEPLOYMENT_PATH, "public-registry.yaml"),
service=join(DEFAULT_SERVICE_PATH, "public-registry.yaml"),
properties={'http': True}, # https://hub.armosec.io/docs/registry-vulnerability-scan
registry='local', # either local or specify the registry itself
configmap_data={
"depth": 2,
"exclude": ["nginx"]
}, # https://hub.armosec.io/docs/registry-vulnerability-scan
expected_results="nginx-new-image.json",
expected_payloads={"image": "nginx:test"}
)

@staticmethod
def vuln_scan_trigger_scan_private_quay_registry():
from systest_utils.statics import DEFAULT_DEPLOYMENT_PATH, DEFAULT_SERVICE_PATH
from os.path import join
return TestConfiguration(
name=inspect.currentframe().f_code.co_name,
test_obj=VulnerabilityScanningRegistry,
deployment=join(DEFAULT_DEPLOYMENT_PATH, "public-registry.yaml"),
service=join(DEFAULT_SERVICE_PATH, "public-registry.yaml"),
# https://hub.armosec.io/docs/registry-vulnerability-scan
properties=None, # https://hub.armosec.io/docs/registry-vulnerability-scan
registry='quay.io/armosec', # either local or specify the registry itself
configmap_data=None, # https://hub.armosec.io/docs/registry-vulnerability-scan
expected_results="nginx-new-image.json",
expected_payloads={"image": "system-test-nginx:latest"}

)

@staticmethod
def vuln_scan_trigger_scan_registry_by_backend():
from tests_scripts.helm.vuln_scan import VulnerabilityScanningRegistryBackendTrigger
from systest_utils.statics import DEFAULT_DEPLOYMENT_PATH, DEFAULT_SERVICE_PATH
from os.path import join
return TestConfiguration(
name=inspect.currentframe().f_code.co_name,
test_obj=VulnerabilityScanningRegistryBackendTrigger,
deployment=join(DEFAULT_DEPLOYMENT_PATH, "public-registry.yaml"),
service=join(DEFAULT_SERVICE_PATH, "public-registry.yaml"),
properties={'http': True}, # https://hub.armosec.io/docs/registry-vulnerability-scan
registry='local', # either local or specify the registry itself
configmap_data=None, # https://hub.armosec.io/docs/registry-vulnerability-scan
expected_results="nginx-new-image.json",
expected_payloads={"image": "nginx:test"},
expected_layers="layers.json"
)

@staticmethod
def vuln_scan_triggering_with_cron_job():
from tests_scripts.helm.vuln_scan import VulnerabilityScanningTriggeringWithCronJob
Expand All @@ -203,29 +125,3 @@ def vuln_scan_triggering_with_cron_job():
schedule_time="1 2 3 4 5",
updating_schedule_time="1 * * * *"
)

@staticmethod
def registry_scanning_triggering_with_cron_job():
from tests_scripts.helm.vuln_scan import RegistryScanningTriggeringWithCronJob
from systest_utils.statics import DEFAULT_DEPLOYMENT_PATH, DEFAULT_SERVICE_PATH, DEFAULT_CONFIGMAP_PATH
from os.path import join
return TestConfiguration(
name=inspect.currentframe().f_code.co_name,
test_obj=RegistryScanningTriggeringWithCronJob,

# This test is forced to use version 1.24.2 of the helm chart since this is the last version which supports the old registry scan API
# Please remove this test once the BE will stop supporting this functionality')
helm_branch="kubescape-operator-1.24.2",
deployment=join(DEFAULT_DEPLOYMENT_PATH, "public-registry.yaml"),
service=join(DEFAULT_SERVICE_PATH, "public-registry.yaml"),
properties={'http': True}, # https://hub.armosec.io/docs/registry-vulnerability-scan
registry='local', # either local or specify the registry itself
configmap_data=None, # https://hub.armosec.io/docs/registry-vulnerability-scan
expected_results="nginx-new-image.json",
expected_payloads={"image": "nginx:test"},
schedule_time="1 2 3 4 5",
updating_schedule_time="2 2 2 2 2",
expected_layers="layers.json",
depth=3,
)

Loading
Loading