-
Notifications
You must be signed in to change notification settings - Fork 316
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
[NET-11106] Make bats tesing more reproducible #4345
base: main
Are you sure you want to change the base?
Conversation
@@ -24,7 +24,7 @@ jobs: | |||
with: | |||
workflow: test.yml | |||
repo: hashicorp/consul-k8s-workflows | |||
ref: main | |||
ref: update-bats-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.
until the PR against the workflows repo merges this PR will be in draft but is still fine for review
df69773
to
3150728
Compare
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.
one blocking change on the bats filter
@@ -30,9 +30,10 @@ generate-external-crds: ## Generate CRDs for externally defined CRDs and copy th | |||
@cd ./control-plane/config/crd/external; \ | |||
kustomize build | yq --split-exp '.metadata.name + ".yaml"' --no-doc | |||
|
|||
|
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.
.PHONY: bats-tests | ||
bats-tests: ## Run Helm chart bats tests. | ||
bats --jobs 4 charts/consul/test/unit | ||
docker run -it -v $(CURDIR):/consul-k8s hashicorpdev/consul-helm-test:latest bats --jobs 4 /consul-k8s/charts/consul/test/unit -f "$(TEST_NAME)" |
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.
docker run -it -v $(CURDIR):/consul-k8s hashicorpdev/consul-helm-test:latest bats --jobs 4 /consul-k8s/charts/consul/test/unit -f "$(TEST_NAME)" | |
docker run -it -v $(CURDIR):/consul-k8s hashicorpdev/consul-helm-test:latest bats --jobs 4 /consul-k8s/charts/consul/test/unit |
Changes proposed in this PR
bats-tests
make target so that you can pass in a specific test to run and to use the docker image we use in CI for reproducibility with CI runsHow I've tested this PR
How I expect reviewers to test this PR
Checklist