-
Notifications
You must be signed in to change notification settings - Fork 5
chore(test): add tests to memory store #2226
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
Conversation
This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID. Online Installer:
Airgap Installer (may take a few minutes before the airgap bundle is built):
Happy debugging! |
exitCode := int32(0) | ||
osExit = func(code int) { | ||
exitCode = code | ||
atomic.StoreInt32(&exitCode, int32(code)) |
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.
Needed to change this for got test -race
.
Makefile
Outdated
@@ -274,7 +274,7 @@ envtest: | |||
.PHONY: unit-tests | |||
unit-tests: envtest | |||
KUBEBUILDER_ASSETS="$(shell ./operator/bin/setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir $(shell pwd)/operator/bin -p path)" \ | |||
go test -tags $(GO_BUILD_TAGS) -v ./pkg/... ./cmd/... ./api/... ./web/... ./pkg-new/... | |||
go test -race -tags $(GO_BUILD_TAGS) -v ./pkg/... ./cmd/... ./api/... ./web/... ./pkg-new/... |
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.
how much time does this add to tests?
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.
On my machine:
time go test -count=1 -race -tags containers_image_openpgp,exclude_graphdriver_btrfs,exclude_graphdriver_devicemapper,exclude_graphdriver_overlay -v ./pkg/... ./cmd/... ./api/... ./web/... ./pkg-new/...
(...)
________________________________________________________
Executed in 28.01 secs fish external
usr time 75.95 secs 0.06 millis 75.95 secs
sys time 21.40 secs 1.70 millis 21.40 secs
time go test -count=1 -tags containers_image_openpgp,exclude_graphdriver_btrfs,exclude_graphdriver_devicemapper,exclude_graphdriver_overlay -v ./pkg/... ./cmd/... ./api/... ./web/... ./pkg-new/...
(...)
________________________________________________________
Executed in 23.82 secs fish external
usr time 48.35 secs 0.07 millis 48.35 secs
sys time 22.86 secs 2.39 millis 22.86 secs
If we want to look at CI:
- 6m 30s https://github.com/replicatedhq/embedded-cluster/actions/runs/15394897039/job/43313027543?pr=2226
- 4m 15s (on a PR) https://github.com/replicatedhq/embedded-cluster/actions/runs/15418826076/job/43388149035?pr=2233
- 3m 16s (in main) https://github.com/replicatedhq/embedded-cluster/actions/runs/15400444450/job/43331496909
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.
About -race
btw, seems like apple silicon's linker is currently throwing some warnings - golang/go#61229 (comment) - which according to that shouldn't affect the test execution though.
726d94a
to
51a9e5c
Compare
51a9e5c
to
58ccf60
Compare
// Create a runtimeconfig to be used in the install process | ||
rc := runtimeconfig.New(nil) | ||
|
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.
We need to use the same runtime config for both manager and controller.
Fix for the test flake #2278 |
Failure is unrelated. Merging. |
What this PR does / why we need it:
Follow up to #2187
See:
Which issue(s) this PR fixes:
https://app.shortcut.com/replicated/story/124364/add-tests-to-memory-store
Does this PR require a test?
Does this PR require a release note?
Does this PR require documentation?