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

[NET-11106] Make bats tesing more reproducible #4345

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jm96441n
Copy link
Member

@jm96441n jm96441n commented Sep 19, 2024

Changes proposed in this PR

  • update the 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 runs
  • Update version of bats, terraform, and go in the bats testing dockerfile

How I've tested this PR

How I expect reviewers to test this PR

Checklist

@jm96441n jm96441n changed the title testing out changes to bats testing [NET-11106] Make bats tesing more reproducible Sep 19, 2024
@jm96441n jm96441n added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport signals that a PR will not contain a backport label labels Sep 19, 2024
@@ -24,7 +24,7 @@ jobs:
with:
workflow: test.yml
repo: hashicorp/consul-k8s-workflows
ref: main
ref: update-bats-tests
Copy link
Member Author

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

@jmurret jmurret marked this pull request as ready for review September 19, 2024 21:09
Copy link
Member

@jmurret jmurret left a 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


Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

.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)"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-backport signals that a PR will not contain a backport label pr/no-changelog PR does not need a corresponding .changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants