File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 if-no-files-found : ignore
5959 retention-days : 1
6060
61+ test-stress :
62+ name : E2E Stress Tests
63+ strategy :
64+ fail-fast : true
65+ matrix :
66+ include :
67+ - profile : short
68+ steps : 5
69+ interval : 5s
70+ - profile : long
71+ steps : 15
72+ interval : 10s
73+
74+ runs-on : ubuntu-latest
75+ env :
76+ TEST_E2E_DIAGNOSTIC_REPORT_PATH : ${{ github.workspace }}/test-report
77+ steps :
78+ - uses : actions/checkout@v4
79+
80+ - uses : actions/setup-go@v5
81+ with :
82+ go-version : ${{ env.GO_VERSION }}
83+
84+ - run : go mod tidy
85+
86+ - run : make test-e2e-stress
87+ env :
88+ TEST_E2E_STRESS_STEPS : ${{ matrix.steps }}
89+ TEST_E2E_STRESS_STEP_INTERVAL : ${{ matrix.interval }}
90+
91+ - uses : actions/upload-artifact@v4
92+ if : failure()
93+ with :
94+ name : test-report-stress-${{ matrix.profile }}
95+ path : ${{ env.TEST_E2E_DIAGNOSTIC_REPORT_PATH }}
96+ if-no-files-found : ignore
97+
98+ - run : go tool covdata textfmt -i /tmp/kind/data/emqx-operator-system/test-e2e-coverage -o ${{ github.workspace }}/cover.stress.out
99+
100+ - uses : actions/upload-artifact@v4
101+ with :
102+ name : coverprofile-stress-${{ matrix.profile }}
103+ path : ${{ github.workspace }}/cover.stress.out
104+ if-no-files-found : ignore
105+ retention-days : 1
106+
61107 test-upgrade :
62108 name : E2E Upgrade Tests - ${{ matrix.profile }}
63109 strategy :
Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
8282TEST_E2E_UPGRADE_IMAGE_INITIAL ?= emqx/emqx:5.10.2
8383TEST_E2E_UPGRADE_IMAGE_UPGRADE ?= emqx/emqx:6.1.0
8484
85+ TEST_E2E_STRESS_STEPS ?= 8
86+ TEST_E2E_STRESS_STEP_INTERVAL ?= 5s
87+ TEST_E2E_STRESS_IMAGE ?= emqx/emqx:6.1.0
88+
8589.PHONY : test
8690test : manifests generate fmt vet envtest # # Run tests.
8791 KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test -v $$(go list ./... | grep -v /e2e ) -coverprofile ./cover.out
@@ -97,6 +101,12 @@ test-e2e-upgrade: manifests generate e2e-test-cluster ## Run E2E upgrade tests.
97101 -emqx-image-initial=$(TEST_E2E_UPGRADE_IMAGE_INITIAL ) \
98102 -emqx-image-upgrade=$(TEST_E2E_UPGRADE_IMAGE_UPGRADE )
99103
104+ test-e2e-stress : manifests generate e2e-test-cluster # # Run E2E stress tests. Expected an isolated environment using Kind.
105+ go test ./test/e2e/stress -v -ginkgo.v -timeout 20m \
106+ -stress-steps=$(TEST_E2E_STRESS_STEPS ) \
107+ -step-interval=$(TEST_E2E_STRESS_STEP_INTERVAL ) \
108+ -emqx-image=$(TEST_E2E_STRESS_IMAGE )
109+
100110.PHONY : test-e2e-helm
101111test-e2e-helm : e2e-test-cluster # # Run Helm chart E2E tests. Expected an isolated environment using Kind.
102112 go test ./test/e2e-helm/ -v -ginkgo.v -timeout 20m
You can’t perform that action at this time.
0 commit comments