Skip to content

Commit 70e760e

Browse files
authored
Move autoscale to its own test suite (#1733)
1 parent 625d1e0 commit 70e760e

16 files changed

+19
-3
lines changed

.github/workflows/e2e.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ jobs:
1111
name: End-to-end tests
1212
runs-on: ubuntu-20.04
1313
strategy:
14+
fail-fast: false
1415
matrix:
1516
# The e2e tests are run on the lowest and highest supported k8s version.
1617
# All Kubernetes version in between expose the same APIs, hence the operator
1718
# should be compatible with them.
1819
kube-version:
1920
- "1.19"
2021
- "1.26"
22+
group:
23+
- e2e e2e-upgrade
24+
- e2e-autoscale
2125

2226
steps:
2327

@@ -35,7 +39,7 @@ jobs:
3539
- name: "run tests"
3640
env:
3741
KUBE_VERSION: ${{ matrix.kube-version }}
38-
run: make prepare-e2e e2e e2e-upgrade KUBE_VERSION=$KUBE_VERSION VERSION=e2e
42+
run: make prepare-e2e ${{ matrix.group }} KUBE_VERSION=$KUBE_VERSION VERSION=e2e
3943

4044
- name: "log operator if failed"
4145
if: ${{ failure() }}

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ e2e:
181181
e2e-upgrade: undeploy
182182
$(KUTTL) test --config kuttl-test-upgrade.yaml
183183

184+
# end-to-end-test for testing autoscale
185+
.PHONY: e2e-autoscale
186+
e2e-autoscale:
187+
$(KUTTL) test --config kuttl-test-autoscale.yaml
188+
184189
.PHONY: e2e-log-operator
185190
e2e-log-operator:
186191
kubectl get pod -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $$1}' | xargs -I {} kubectl logs -n opentelemetry-operator-system {} manager

kuttl-test-autoscale.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestSuite
3+
artifactsDir: ./tests/_build/artifacts/
4+
testDirs:
5+
- ./tests/e2e-autoscale/
6+
timeout: 150

kuttl-test.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ kind: TestSuite
33
artifactsDir: ./tests/_build/artifacts/
44
testDirs:
55
- ./tests/e2e/
6-
timeout: 150
6+
timeout: 150
7+
parallel: 4

tests/e2e/autoscale/02-install.yaml tests/e2e-autoscale/autoscale/02-install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
stabilizationWindowSeconds: 1
2020
resources:
2121
limits:
22-
cpu: 250m
22+
cpu: 100m
2323
memory: 128Mi
2424
requests:
2525
cpu: 5m

0 commit comments

Comments
 (0)