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

Parallelise and randomize tests #331

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.19.x
- name: Install Ginkgo testing framework
run: |
# Do the install from outside the code tree to avoid messing with go.sum
cd /tmp; go install github.com/onsi/ginkgo/[email protected]
- name: Configure AWS credentials to use in AWS Stack tests
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: "1.19.x"
- name: Install Ginkgo testing framework
run: |
# Do the install from outside the code tree to avoid messing with go.sum
cd /tmp; go install github.com/onsi/ginkgo/[email protected]
- name: Configure AWS credentials to use in AWS Stack tests
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run-acceptance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.19.x
- name: Install Ginkgo testing framework
run: |
# Do the install from outside the code tree to avoid messing with go.sum
cd /tmp; go install github.com/onsi/ginkgo/[email protected]
- name: Configure AWS credentials to use in AWS Stack tests
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ push-image:
docker push $(IMAGE_NAME):$(VERSION)

test: codegen download-test-deps
KUBEBUILDER_ASSETS="$(shell setup-envtest --use-env use -p path)" go test -v ./test/...
KUBEBUILDER_ASSETS="$(shell setup-envtest --use-env use -p path)" \
ginkgo -nodes=4 --randomizeAllSpecs ./test/...
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this now also a dev machine dependency? Should it be added to README/CONTRIBUTING?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ginkgo is mentioned as a prerequisite in docs/build.md already (I didn't remove it when I changed the Makefile the last time).


deploy:
kubectl apply -f deploy/yaml/service_account.yaml
Expand Down
2 changes: 1 addition & 1 deletion test/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var _ = BeforeSuite(func() {
k8sManager, err = ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme.Scheme,
HealthProbeBindAddress: "0",
MetricsBindAddress: "0.0.0.0:8383",
MetricsBindAddress: "0",
})
Expect(err).ToNot(HaveOccurred())

Expand Down