Skip to content

Commit 6595583

Browse files
committed
feat(e2e): simplify script
Signed-off-by: Szilard Parrag <[email protected]>
1 parent 81f5d49 commit 6595583

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,4 @@ tidy: ## Tidy Go modules
189189

190190
.PHONY: e2e-test
191191
e2e-test: ## Run e2e tests, make sure subscription operator is running somewhere
192-
cd e2e && timeout --foreground 15m ./e2e_test.sh || echo "E2E test failed"; return 1
192+
cd e2e && timeout --foreground 15m ./e2e_test.sh || (echo "E2E test failed"; exit 1)
File renamed without changes.

e2e/e2e_test.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/env bash
22

3+
set -eou pipefail
4+
35
create_if_does_not_exist() {
46
local resource_type=$1
57
local resource_name=$2
@@ -31,14 +33,13 @@ echo "Wait until otel operator pod is in ready state..."
3133
kubectl wait --namespace opentelemetry-operator-system --for=condition=available deployment/opentelemetry-operator-controller-manager --timeout=300s
3234

3335
# Create subscription operator resources
34-
cd .. && make manifests generate install && cd -
36+
(cd .. && make manifests generate install)
3537

3638
# Use example
37-
kubectl apply -f ../docs/examples
39+
kubectl apply -f ../docs/examples/simple-demo
3840

3941

40-
cd .. && timeout 5m make run &
41-
cd -
42+
(cd .. && timeout 5m make run &)
4243

4344
# Create log-generator
4445
helm install --wait --create-namespace --namespace example-tenant-ns --generate-name oci://ghcr.io/kube-logging/helm-charts/log-generator

0 commit comments

Comments
 (0)