From d3bf1af96c81568dabc5df2ab52f65988a1123b3 Mon Sep 17 00:00:00 2001 From: Grace Wehner Date: Wed, 25 Sep 2024 18:17:41 -0700 Subject: [PATCH] Test: re-enable arm64 tests, add missed files for Arc testkube tests (#981) --- otelcollector/shared/proxy_settings.go | 2 +- .../test/testkube/testkube-test-crs-arc.yaml | 170 ++++++++++++++++++ .../test/testkube/testkube-test-crs.yaml | 6 +- 3 files changed, 174 insertions(+), 4 deletions(-) create mode 100644 otelcollector/test/testkube/testkube-test-crs-arc.yaml diff --git a/otelcollector/shared/proxy_settings.go b/otelcollector/shared/proxy_settings.go index 7728b99e3..f94fd9e57 100644 --- a/otelcollector/shared/proxy_settings.go +++ b/otelcollector/shared/proxy_settings.go @@ -24,7 +24,7 @@ func copyCAAnchors() { cmd := exec.Command("cp", match, "/etc/pki/ca-trust/source/anchors") cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil { - log.Printf("Error copying %s: %v", match, err) + log.Printf("Warning copying %s: %v", match, err) } } else if os.IsNotExist(err) { log.Printf("File %s does not exist", match) diff --git a/otelcollector/test/testkube/testkube-test-crs-arc.yaml b/otelcollector/test/testkube/testkube-test-crs-arc.yaml new file mode 100644 index 000000000..e0dfd93d4 --- /dev/null +++ b/otelcollector/test/testkube/testkube-test-crs-arc.yaml @@ -0,0 +1,170 @@ +apiVersion: tests.testkube.io/v3 +kind: Test +metadata: + name: containerstatus + namespace: testkube + labels: + executor: ginkgo-executor + test-type: ginkgo-test +spec: + type: ginkgo/test + content: + type: git + repository: + type: git + uri: https://github.com/Azure/prometheus-collector + branch: main + path: otelcollector/test/ginkgo-e2e + executionRequest: + args: + - "--label-filter" + - "!(windows,arm64,linux-daemonset-custom-config)" + - "./containerstatus" + executePostRunScriptBeforeScraping: false +--- +apiVersion: tests.testkube.io/v3 +kind: Test +metadata: + name: livenessprobe + namespace: testkube + labels: + executor: ginkgo-executor + test-type: ginkgo-test +spec: + type: ginkgo/test + content: + type: git + repository: + type: git + uri: https://github.com/Azure/prometheus-collector + branch: main + path: otelcollector/test/ginkgo-e2e + executionRequest: + args: + - "--label-filter" + - "!(windows,arm64,linux-daemonset-custom-config)" + - "./livenessprobe" + executePostRunScriptBeforeScraping: false +--- +apiVersion: tests.testkube.io/v3 +kind: Test +metadata: + name: prometheusui + namespace: testkube + labels: + executor: ginkgo-executor + test-type: ginkgo-test +spec: + type: ginkgo/test + content: + type: git + repository: + type: git + uri: https://github.com/Azure/prometheus-collector + branch: main + path: otelcollector/test/ginkgo-e2e + executionRequest: + args: + - "--label-filter" + - "!(windows,arm64,linux-daemonset-custom-config)" + - "./prometheusui" + executePostRunScriptBeforeScraping: false +--- +apiVersion: tests.testkube.io/v3 +kind: Test +metadata: + name: operator + namespace: testkube + labels: + executor: ginkgo-executor + test-type: ginkgo-test +spec: + type: ginkgo/test + content: + type: git + repository: + type: git + uri: https://github.com/Azure/prometheus-collector + branch: main + path: otelcollector/test/ginkgo-e2e + executionRequest: + args: + - "--ldflags" + - "-s -X github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring.GroupName=azmonitoring.coreos.com" + - "./operator" + executePostRunScriptBeforeScraping: false +--- +apiVersion: tests.testkube.io/v3 +kind: Test +metadata: + name: querymetrics + namespace: testkube + labels: + executor: ginkgo-executor + test-type: ginkgo-test +spec: + type: ginkgo/test + content: + type: git + repository: + type: git + uri: https://github.com/Azure/prometheus-collector + branch: main + path: otelcollector/test/ginkgo-e2e + executionRequest: + variables: + AMW_QUERY_ENDPOINT: + name: AMW_QUERY_ENDPOINT + value: "$AMW_QUERY_ENDPOINT" + type: basic + AZURE_CLIENT_ID: + name: AZURE_CLIENT_ID + value: "$AZURE_CLIENT_ID" + type: basic + args: + - "--label-filter" + - "!(windows,arm64,linux-daemonset-custom-config)" + - "./querymetrics" + executePostRunScriptBeforeScraping: false +--- +apiVersion: tests.testkube.io/v3 +kind: TestSuite +metadata: + name: e2e-tests-nightly + namespace: testkube +spec: + steps: + - stopOnFailure: false + execute: + - test: containerstatus + - test: prometheusui + - test: operator + - stopOnFailure: false + execute: + - delay: 2m0s + - stopOnFailure: false + execute: + - test: querymetrics + - stopOnFailure: false + execute: + - test: livenessprobe + schedule: "0 7 * * *" +--- +apiVersion: tests.testkube.io/v3 +kind: TestSuite +metadata: + name: e2e-tests-merge + namespace: testkube +spec: + steps: + - stopOnFailure: false + execute: + - test: containerstatus + - test: prometheusui + - test: operator + - stopOnFailure: false + execute: + - delay: 2m0s + - stopOnFailure: false + execute: + - test: querymetrics diff --git a/otelcollector/test/testkube/testkube-test-crs.yaml b/otelcollector/test/testkube/testkube-test-crs.yaml index 9f1c12bff..058d9fdbf 100644 --- a/otelcollector/test/testkube/testkube-test-crs.yaml +++ b/otelcollector/test/testkube/testkube-test-crs.yaml @@ -18,7 +18,7 @@ spec: executionRequest: args: - "--label-filter" - - "!(arc-extension,linux-daemonset-custom-config,arm64)" + - "!(arc-extension,linux-daemonset-custom-config)" - "./containerstatus" executePostRunScriptBeforeScraping: false --- @@ -42,7 +42,7 @@ spec: executionRequest: args: - "--label-filter" - - "!(arc-extension,linux-daemonset-custom-config,arm64)" + - "!(arc-extension,linux-daemonset-custom-config)" - "./livenessprobe" executePostRunScriptBeforeScraping: false --- @@ -66,7 +66,7 @@ spec: executionRequest: args: - "--label-filter" - - "!(arc-extension,linux-daemonset-custom-config,arm64)" + - "!(arc-extension,linux-daemonset-custom-config)" - "./prometheusui" executePostRunScriptBeforeScraping: false ---