Skip to content
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

Kubebuilder-tools workaround for darwin/arm64 arch #49

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

didierofrivia
Copy link
Member

This workaround is needed to run the tests from M1 macs and any arm64 architecture.

@@ -153,7 +159,7 @@ clean-cov: ## Remove coverage report

.PHONY: test
test: clean-cov manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out -v -timeout 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok with removing -timeout 0, but why -v?

Copy link
Member Author

@didierofrivia didierofrivia Sep 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the verbosity only to match authorino-operator and limitador-operator . I could add it if needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please.. verbosity for unittests is a good thing, isn't it?

without -v

KUBEBUILDER_ASSETS="/home/eguzki/.local/share/kubebuilder-envtest/k8s/1.22.1-linux-amd64" go test ./... -coverprofile cover.out 
?   	github.com/kuadrant/kuadrant-operator	[no test files]
?   	github.com/kuadrant/kuadrant-operator/api/v1beta1	[no test files]
ok  	github.com/kuadrant/kuadrant-operator/controllers	8.562s	coverage: 0.0% of statements
?   	github.com/kuadrant/kuadrant-operator/kuadrantcontrollermanifests	[no test files]
?   	github.com/kuadrant/kuadrant-operator/pkg/common	[no test files]
ok  	github.com/kuadrant/kuadrant-operator/pkg/log	0.014s	coverage: 37.5% of statements
?   	github.com/kuadrant/kuadrant-operator/pkg/reconcilers	[no test files]

with -v

KUBEBUILDER_ASSETS="/home/eguzki/.local/share/kubebuilder-envtest/k8s/1.22.1-linux-amd64" go test ./... -coverprofile cover.out -v
?   	github.com/kuadrant/kuadrant-operator	[no test files]
?   	github.com/kuadrant/kuadrant-operator/api/v1beta1	[no test files]
=== RUN   TestAPIs
Running Suite: Controller Suite
===============================
Random Seed: 1664545715
Will run 0 of 0 specs



Ran 0 of 0 Specs in 8.654 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 0 Skipped
You're using deprecated Ginkgo functionality:
=============================================
Ginkgo 2.0 is under active development and will introduce (a small number of) breaking changes.
To learn more, view the migration guide at https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md
To comment, chime in at https://github.com/onsi/ginkgo/issues/711

  You are using a custom reporter.  Support for custom reporters will likely be removed in V2.  Most users were using them to generate junit or teamcity reports and this functionality will be merged into the core reporter.  In addition, Ginkgo 2.0 will support emitting a JSON-formatted report that users can then manipulate to generate custom reports.

  If this change will be impactful to you please leave a comment on https://github.com/onsi/ginkgo/issues/711
  Learn more at: https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md#removed-custom-reporters

To silence deprecations that can be silenced set the following environment variable:
  ACK_GINKGO_DEPRECATIONS=1.16.4

--- PASS: TestAPIs (8.65s)
PASS
coverage: 0.0% of statements
ok  	github.com/kuadrant/kuadrant-operator/controllers	8.679s	coverage: 0.0% of statements
?   	github.com/kuadrant/kuadrant-operator/kuadrantcontrollermanifests	[no test files]
?   	github.com/kuadrant/kuadrant-operator/pkg/common	[no test files]
=== RUN   TestToLevel
--- PASS: TestToLevel (0.00s)
=== RUN   TestToMode
--- PASS: TestToMode (0.00s)
PASS
coverage: 37.5% of statements
ok  	github.com/kuadrant/kuadrant-operator/pkg/log	0.017s	coverage: 37.5% of statements
?   	github.com/kuadrant/kuadrant-operator/pkg/reconcilers	[no test files]

BTW, we need to upgrade ginkgo to v2

@didierofrivia didierofrivia merged commit 3657c6b into main Sep 30, 2022
@didierofrivia didierofrivia deleted the fix-test-arm branch September 30, 2022 16:27
didierofrivia added a commit that referenced this pull request Oct 28, 2022
* main:
  [makefile] kubebuilder-tools workaround for darwin/arm64 arch (#49)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants