Skip to content

Commit

Permalink
Add test justfile target
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkegley committed Oct 31, 2024
1 parent 000f594 commit 50e101c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/"
"s3://docs.rstudio.com/helm/"

0 comments on commit 50e101c

Please sign in to comment.