-
Notifications
You must be signed in to change notification settings - Fork 0
Add E2E tests with GitHub Actions CI integration #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c3fbc08
e1abb60
c356a2a
2a1ddc9
441fa59
25b4011
27eceff
34a79ed
7eacc74
eb654f2
ad318c7
511e20a
d833370
3132160
06a8d53
c817b82
d10357a
7bee8c9
1c96247
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,10 +141,20 @@ vet: ## Run go vet against code. | |
| test: manifests generate fmt vet envtest ## Run tests. | ||
| KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out | ||
|
|
||
| # Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors. | ||
| .PHONY: test-e2e # Run the e2e tests against a Kind k8s instance that is spun up. | ||
| test-e2e: | ||
| go test ./test/e2e/ -v -ginkgo.v | ||
| # Run the e2e tests using e2e-framework (auto-creates Kind cluster) | ||
| # Note: Tests with 'disruptive' label (OperatorCrashRecovery, NoSpuriousUpdatesAfterRestart) | ||
| # restart the operator pod and should not run in parallel with other tests. | ||
| .PHONY: test-e2e | ||
| test-e2e: ## Run all e2e tests against a Kind cluster (auto-created) | ||
| go test ./test/e2e/... -v -timeout 20m | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 20m ? this is quite long no ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the max timeout, not actual duration. E2E tests need time for pod scheduling, image pulls, and operator recovery tests. Actual runs complete much faster(10m-11m). |
||
|
|
||
| .PHONY: test-e2e-safe | ||
| test-e2e-safe: ## Run only parallel-safe e2e tests (excludes operator restart tests) | ||
| go test ./test/e2e/... -v -timeout 15m -skip 'TestPodLifecycle_OperatorCrashRecovery|TestPodLifecycle_NoSpuriousUpdatesAfterRestart' | ||
|
|
||
| .PHONY: test-e2e-disruptive | ||
| test-e2e-disruptive: ## Run only disruptive e2e tests (operator restart tests) | ||
| go test ./test/e2e/... -v -timeout 10m -run 'TestPodLifecycle_OperatorCrashRecovery|TestPodLifecycle_NoSpuriousUpdatesAfterRestart' | ||
|
|
||
| .PHONY: lint | ||
| lint: golangci-lint ## Run golangci-lint linter | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| package v1alpha1 | ||
|
|
||
| const ForceRefreshAnnotation = "ui.scality.com/force-refresh" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,8 @@ | ||
| resources: | ||
| - manager.yaml | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| images: | ||
| - name: controller | ||
| newName: ui-operator | ||
| newTag: e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to push image on every PR ? I think is ok !
You can also allow running specific test suites with build tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if we want to test the image which didn't merge yet