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

Add container based tests documentation #492

Merged
merged 4 commits into from
Apr 14, 2021
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
21 changes: 18 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion test/docker/Test.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down