paritytech / helm-charts

Parity & Polkadot Helm charts collection
GNU General Public License v3.0
25 stars 22 forks source link

Expand test scenarios #296

Open bakhtin opened 1 year ago

bakhtin commented 1 year ago

Each Helm chart is now configured to run a smoke test on each PR. A chart is deployed to a local K8s cluster with default or close-to-default parameters. While smoke tests are still good to capture basic errors, they don't cover real-world usage scenarios.

To prevent the bugs from ending up in the release more comprehensive end-to-end tests should be added to the CI pipeline. But these tests should not repeat or serve as a replacement for the tests of the application itself. Rather the tests should capture Helm chart specific errors like improperly exposed ports, failures to attach PVCs, bugs in the init-scripts, etc.

The values.yaml file should also be extended with more comprehensive configuration reflecting how the chart is used in the wild. Potentially, having multiple values.yamls to cover different use-cases.

bakhtin commented 1 year ago

Check out https://github.com/bitnami/charts/blob/main/TESTING.md

bakhtin commented 1 year ago

As the first step I'll pick up node Helm chart to implement tests for it. Node Helm chart is the most used and complex chart in the repo.

The initial iteration should cover the most used configuration options and the pieces of functionality that has the most impact on the runtime. I came up with the following:

Test the following node modes:

Test scenarios:

I found the Bitnami's testing guide comprehensive covering the details of possible strategies and tools for testing Helm charts. Bitnami's Helm charts repo uses 3 tools to run the tests:

Each test scenario may require one or more tools to verify the requirements are met.

bakhtin commented 11 months ago

Covered a few scenarios in #304: