openbao-helm/test
Jason O'Donnell b21b37b07a
Update to v0.12.0 (#532)
* Update to v0.12.0

* Update values.schema.json

* Fix schema types

* revert image repo
2021-05-25 13:46:48 -04:00
..
acceptance Update to v0.12.0 (#532) 2021-05-25 13:46:48 -04:00
chart added values json schema (#513) 2021-05-14 08:59:36 -07:00
docker Add container based tests documentation (#492) 2021-04-14 13:05:38 -04:00
terraform updating acceptance tests to k8s 1.17 on gke (#473) 2021-03-24 09:20:06 -04:00
unit add schema unit tests (#530) 2021-05-25 10:16:29 -04:00
README.md added values json schema (#513) 2021-05-14 08:59:36 -07:00

Vault Helm Tests

Running Vault Helm Acceptance tests

The Makefile at the top level of this repo contains a few target that should help with running acceptance tests in your own GKE instance.

  • Set the GOOGLE_CREDENTIALS and CLOUDSDK_CORE_PROJECT variables at the top of the file. GOOGLE_CREDENTIALS should contain the local path to your Google Cloud Platform account credentials in JSON format. CLOUDSDK_CORE_PROJECT should be set to the ID of your GCP project.
  • Run make test-image to create the docker image (with dependencies installed) that will be re-used in the below steps.
  • Run make test-provision to provision the GKE cluster using terraform.
  • Run make test-acceptance to run the acceptance tests in this already provisioned cluster.
  • You can choose to only run certain tests by setting the ACCEPTANCE_TESTS variable and re-running the above target.
  • Run make test-destroy when you have finished testing and want to tear-down and remove the cluster.

Running chart verification tests

If chart-verifier is built and available in your PATH, run:

bats test/chart/verifier.bats

Or if you'd rather use the latest chart-verifier docker container, set USE_DOCKER:

USE_DOCKER=true bats test/chart/verifier.bats

Generating the values json schema

There is a make target for generating values.schema.json:

make values-schema

It relies on the helm schema-gen plugin. Note that some manual editing will be required, since several properties accept multiple data types.