diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7aeba09d..929a8494 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,9 +42,13 @@ Running the [helm chart unit tests](https://github.com/helm-unittest/helm-unitte # install the unittest plugin helm plugin install https://github.com/helm-unittest/helm-unittest.git -# run the rstudio-connect chart unittests # unit tests are defined in `charts/$CHART_NAME/tests` -helm unittest --color ./charts/rstudio-connect + +# test all charts +just test + +# run unit tests for a single chart +just test rstudio-connect ``` ## Templates diff --git a/Justfile b/Justfile index 51653743..d12a4330 100644 --- a/Justfile +++ b/Justfile @@ -75,6 +75,17 @@ snapshot-rsw-diff: fi done +test chart='all': + #!/usr/bin/env bash + set -xe + if [[ "{{ chart }}" == 'all' ]]; then + for dir in $(ls -d {{ justfile_directory() }}/charts/*/); do + helm unittest $dir + done + else + helm unittest "charts/{{ chart }}" + fi + test-connect-interpreter-versions: #!/usr/bin/env bash set -xe @@ -118,4 +129,4 @@ push-docs: # The s3 bucket is s3://docs.rstudio.com/, which is available as https://docs.posit.co/ aws s3 sync ${s3_args[*]:-} \ _site \ - "s3://docs.rstudio.com/helm/" \ No newline at end of file + "s3://docs.rstudio.com/helm/"