Skip to content

Add unit tests for rstudio-library chart.#764

Open
bschwedler wants to merge 1 commit intomainfrom
rstudio-library-unittest
Open

Add unit tests for rstudio-library chart.#764
bschwedler wants to merge 1 commit intomainfrom
rstudio-library-unittest

Conversation

@bschwedler
Copy link
Contributor

@bschwedler bschwedler commented Jan 28, 2026

Summary

Create test harness chart for unit testing rstudio-library templates.
Library charts cannot be tested directly, so this application chart
depends on rstudio-library and will exercise its templates.

  • Add rstudio-library-test harness chart in other-charts/
  • Add test templates exercising all rstudio-library helpers: config formatters, ingress, RBAC, license, launcher templates, chronicle agent, debug, tplvalues, and profiles
  • Add helm-unittest test suites for each template
  • Update CI to run rstudio-library-test unit tests and exclude it from install tests

@bschwedler bschwedler force-pushed the rstudio-library-unittest branch from 8fce3ff to ebc81cc Compare January 28, 2026 21:17
@bschwedler bschwedler force-pushed the rstudio-library-unittest branch 3 times, most recently from d38daf8 to 7c435e1 Compare March 18, 2026 15:56
Create test harness chart for unit testing rstudio-library templates.
Library charts cannot be tested directly, so this application chart
depends on rstudio-library and will exercise its templates.
@bschwedler bschwedler force-pushed the rstudio-library-unittest branch from 7c435e1 to b7f30c5 Compare March 18, 2026 15:59
@bschwedler bschwedler marked this pull request as ready for review March 18, 2026 16:08
@bschwedler bschwedler requested review from a team as code owners March 18, 2026 16:08
@bschwedler bschwedler requested a review from jforest March 18, 2026 16:08
@bschwedler
Copy link
Contributor Author

@jforest I believe this should be good to go now.

# Run tests for charts in other-charts/ directory
for dir in other-charts/*/; do
[ -d "$dir" ] || continue
if [ -d "$dir/tests" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also apply to the regular charts?

echo "${{ secrets.PPM_LICENSE_FILE }}" > ppm.lic
kubectl create secret generic ppm-license --from-file=ppm.lic --namespace posit-test
rm ppm.lic
# Use env vars and stdin to avoid secrets in temp files and command line args
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Comment on lines +1 to +3
# Base values that null out all test categories
# Each test suite should include this file and then override only what it needs
# This reduces boilerplate and makes adding new test categories easier
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE, I love this


dependencies:
- name: rstudio-library
version: "0.1.36"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we want to hard code this. Do we want it to check all update to rstudio-library?

Comment on lines +9 to +10
- name: sol-eng
email: docker@rstudio.com
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sol-eng is it? and probably want an @posit.co email


| Name | Email | Url |
| ---- | ------ | --- |
| sol-eng | <docker@rstudio.com> | <https://github.com/rstudio/helm> |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in Chart.yaml probably not sol-eng and probably want an @posit.co email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants