Add container based tests documentation (#492)

* update documentation with running unit tests using container

* promote bats version to 1.3.0

* Update CONTRIBUTING.md

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>

* Update CONTRIBUTING.md

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
This commit is contained in:
Arie Lev 2021-04-14 20:05:38 +03:00 committed by GitHub
parent 27338595e8
commit dcb4b10283
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 4 deletions

View file

@ -62,8 +62,23 @@ The unit tests don't require any active Kubernetes cluster and complete
very quickly. These should be used for fast feedback during development.
The acceptance tests require a Kubernetes cluster with a configured `kubectl`.
### Prequisites
* [Bats](https://github.com/bats-core/bats-core)
### Test Using Docker Container
The following are the instructions for running bats tests using a Docker container.
#### Prerequisites
* Docker installed
* `vault-helm` checked out locally
#### Test
**Note:** the following commands should be run from the `vault-helm` directory.
First, build the Docker image for running the tests:
```shell
docker build -f ${PWD}/test/docker/Test.dockerfile ${PWD}/test/docker/ -t vault-helm-test
```bash
brew install bats-core
```
@ -76,7 +91,7 @@ The acceptance tests require a Kubernetes cluster with a configured `kubectl`.
brew install kubernetes-helm
```
### Running The Tests
#### Test
To run the unit tests:

View file

@ -9,7 +9,7 @@
FROM docker.mirror.hashicorp.services/alpine:latest
WORKDIR /root
ENV BATS_VERSION "1.1.0"
ENV BATS_VERSION "1.3.0"
ENV TERRAFORM_VERSION "0.12.10"
# base packages