Skip to content
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
6 changes: 6 additions & 0 deletions .openshift-ci/ci_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ class OperatorE2eTest(BaseTest):
E2E_TEST_TIMEOUT_SEC = 50 * 60
SCORECARD_TEST_TIMEOUT_SEC = 20 * 60

def __init__(self):
self.test_outputs = [
"operator/build/kuttl-test-artifacts",
"operator/build/kuttl-test-artifacts-upgrade",
]

def run(self):
print("Deploying operator")
self.run_with_graceful_kill(
Expand Down
6 changes: 3 additions & 3 deletions .openshift-ci/post_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class PostClusterTest(StoreArtifacts):

def __init__(
self,
collect_central_artifacts=True,
check_stackrox_logs=False,
artifact_destination_prefix=None,
):
Expand All @@ -115,13 +116,12 @@ def __init__(
"openshift-etcd",
"openshift-controller-manager",
]
self.central_is_responsive = False
self.collect_central_artifacts = collect_central_artifacts

def run(self, test_outputs=None):
self.central_is_responsive = self.wait_for_central_api()
self.collect_service_logs()
self.collect_collector_metrics()
if self.central_is_responsive:
if self.collect_central_artifacts and self.wait_for_central_api():
self.get_central_debug_dump()
self.get_central_diagnostics()
self.grab_central_data()
Expand Down
4 changes: 2 additions & 2 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ test-e2e-deployed: validate-crs kuttl ## Run e2e tests with manager deployed on
KUTTL=$(KUTTL) REAL_KUBECONFIG=$${KUBECONFIG} SKIP_MANAGER_START=1 $(KUTTL) test

test-upgrade: kuttl bundle-post-process ## Run OLM-based operator upgrade tests.
mkdir -p $(PROJECT_DIR)/build/kuttl-test-artifacts
mkdir -p $(PROJECT_DIR)/build/kuttl-test-artifacts-upgrade
SKIP_MANAGER_START=1 \
NEW_PRODUCT_VERSION=$$(make --quiet --no-print-directory -C .. tag) \
KUTTL=$(KUTTL) REAL_KUBECONFIG=$${KUBECONFIG} $(KUTTL) test --config kuttl-test.yaml tests/upgrade
KUTTL=$(KUTTL) REAL_KUBECONFIG=$${KUBECONFIG} $(KUTTL) test --config kuttl-test.yaml --artifacts-dir build/kuttl-test-artifacts-upgrade tests/upgrade

stackrox-image-pull-secret: ## Create default image pull secret for StackRox images on Quay.io. Used by Helm chart.
# Create stackrox namespace if not exists.
Expand Down
7 changes: 6 additions & 1 deletion scripts/ci/jobs/openshift_4_operator_e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
from runners import ClusterTestRunner
from ci_tests import OperatorE2eTest
from pre_tests import PreSystemTests
from post_tests import PostClusterTest, FinalPost


ClusterTestRunner(pre_test=PreSystemTests(), test=OperatorE2eTest()).run()
ClusterTestRunner(
pre_test=PreSystemTests(),
test=OperatorE2eTest(),
post_test=PostClusterTest(collect_central_artifacts=False),
final_post=FinalPost()).run()