From 3ec36b055b6e20960141a447e77bbdb6d5cbbbe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 26 Feb 2024 12:44:51 +0100 Subject: [PATCH] Use chainsaw for operator E2E tests --- .github/workflows/operator-test.yaml | 20 +++---------------- charts/opentelemetry-operator/kuttl-test.yaml | 4 ---- 2 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 charts/opentelemetry-operator/kuttl-test.yaml diff --git a/.github/workflows/operator-test.yaml b/.github/workflows/operator-test.yaml index 6a284f542..1915109f3 100644 --- a/.github/workflows/operator-test.yaml +++ b/.github/workflows/operator-test.yaml @@ -45,22 +45,8 @@ jobs: appVersion=$(cat ./charts/opentelemetry-operator/Chart.yaml | sed -nr 's/appVersion: ([0-9]+\.[0-9]+\.[0-9]+)/\1/p') git clone -b v"$appVersion" --single-branch https://github.com/open-telemetry/opentelemetry-operator.git ./opentelemetry-operator - - name: Use public target-allocator image in tests - run: | - appVersion=$(cat ./charts/opentelemetry-operator/Chart.yaml | sed -nr 's/appVersion: ([0-9]+\.[0-9]+\.[0-9]+)/\1/p') - LOCAL_TARGET_ALLOCATOR_IMG="local\/opentelemetry-operator-targetallocator:e2e" - PUBLIC_TARGET_ALLOCATOR_IMG="ghcr.io\/open-telemetry\/opentelemetry-operator\/target-allocator:$appVersion" - - sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e/smoke-targetallocator/*.yaml - sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e/targetallocator-features/00-install.yaml - sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e/prometheus-config-validation/*.yaml - sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e/targetallocator-prometheuscr/00-install.yaml - - - name: Install kuttl - run: | - sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.12.1/kubectl-kuttl_0.12.1_linux_x86_64 - sudo chmod +x /usr/local/bin/kubectl-kuttl - export PATH=$PATH:/usr/local/bin + - name: Install chainsaw + uses: kyverno/action-install-chainsaw@v0.1.6 - name: Install metrics-server run: | @@ -75,4 +61,4 @@ jobs: - name: Run e2e tests working-directory: ./opentelemetry-operator - run: kubectl kuttl test ./tests/e2e --config ../charts/opentelemetry-operator/kuttl-test.yaml --crd-dir ../charts/opentelemetry-operator/crds + run: chainsaw test --test-dir ./tests/e2e diff --git a/charts/opentelemetry-operator/kuttl-test.yaml b/charts/opentelemetry-operator/kuttl-test.yaml deleted file mode 100644 index df96ed77f..000000000 --- a/charts/opentelemetry-operator/kuttl-test.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -crdDir: ./charts/opentelemetry-operator/crds -timeout: 150