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

feat: convert chart tests from the custom bash script to be BATS unit tests #256

Merged
merged 16 commits into from
Aug 8, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
doc: add README for tests
Signed-off-by: Lenin Mehedy <lenin.mehedy@swirldslabs.com>
  • Loading branch information
leninmehedy committed Aug 8, 2023
commit fd4cdddf68d7236a12dc500b34f59e13a6d9a3a7
20 changes: 20 additions & 0 deletions charts/hedera-network/tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Helm Chart Tests
This directory contains the BATS tests for helm chart.

`run.sh` is the entrypoint to execute the tests locally assuming
you have the network deployed already.

## Development
Use the `test_basic_deployment.bats` file as the template while creating new tests.

## Run
- First create a .env file in this directory from the `env.template` file
- From `dev` folder run `make deploy-network`
- Once network is deployed, you can run `./run.sh` to run the tests.
- When tests are working, then redeploy and run the helm tests: `make destroy-network deploy-network helm-test`

## Notes
- Any new template variables should be added in `helpers.sh` with prefix `TMPL_` (e.g TMPL_TOTAL_NODES)
- Any new required env variable should be added in `env.sh`
- Any new helper function should be added in `helpers.sh`
- If a new script file is added, load it in `load.sh`