https://github.com/seanson/terratest-helm-tester
A prebuilt container for running custom Terratest against Helm charts
https://github.com/seanson/terratest-helm-tester
Last synced: 3 months ago
JSON representation
A prebuilt container for running custom Terratest against Helm charts
- Host: GitHub
- URL: https://github.com/seanson/terratest-helm-tester
- Owner: seanson
- Created: 2019-12-02T06:18:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-05T01:00:15.000Z (over 5 years ago)
- Last Synced: 2025-01-13T15:52:21.913Z (5 months ago)
- Language: Go
- Size: 74.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# terratest-helm-tester
[](https://hub.docker.com/r/seanson/terratest-helm-tester)
[](https://hub.docker.com/r/seanson/terratest-helm-tester)
[](https://circleci.com/gh/seanson/terratest-helm-tester)A prebuilt Docker container for running Helm chart spec tests.
## Usage
Create a directory in your project folder for your tests and write a test as per the [example helm test](./test/helm_test.go).
`docker run -v ${PWD}/tests: -v ${PWD}:/app/test seanson/terratest-helm-tester`
This will run the tests found in the `./tests/...` path with the Terratest log wrapper and generate text and XML results.
## CI Support
### CircleCI
CircleCI does not let you copy images in and out of your container in Docker mode so machine mode is required.
See [.cicleci/config.yml](.circleci/config.yml) for details on running CI and copying tests out afterwards.
### Running as a non-root
In some CI systems the build is run by a non-root user. The environment variable `USER_ID` can be passed to the container and it will change ownership of the result files.
`docker run -e USER_ID="$(id -u)" -v ${PWD}/tests: -v ${PWD}:/app/test seanson/terratest-helm-tester`
## TODO
- [x] Sort out better mounting path for tests
- [x] Add wrapper and log parser for generating test outputs
- [x] Show real CI usage
- [ ] Document testing tags