Skip to content

Add unit tests for rstudio-library chart.#764

Merged
bschwedler merged 2 commits intomainfrom
rstudio-library-unittest
Mar 26, 2026
Merged

Add unit tests for rstudio-library chart.#764
bschwedler merged 2 commits intomainfrom
rstudio-library-unittest

Conversation

@bschwedler
Copy link
Copy Markdown
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 4 times, most recently 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
Copy Markdown
Contributor Author

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

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 6ca90db to cadb4f3 Compare March 25, 2026 13:13
@bschwedler bschwedler requested a review from jforest March 25, 2026 13:13
- Update maintainer from sol-eng/docker@rstudio.com to
  rstudio/docker@posit.co to match posit-chronicle convention
- Use tilde version constraint (~0.1.0) for rstudio-library
  dependency so the test harness auto-tracks patch releases
- Unify CI unittest loops into a single loop over both charts/
  and other-charts/ with a consistent tests/ directory guard
@bschwedler bschwedler force-pushed the rstudio-library-unittest branch from cadb4f3 to 8662cf3 Compare March 25, 2026 13:16
Copy link
Copy Markdown
Contributor

@jforest jforest left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my feedback!

I checked it over again, and then I threw claude at it this afternoon and the only item it came up with that is of any concern is:

   - No negative tests for config formatters (e.g., what happens with
   empty config, nil values). Not blocking but could improve robustness
   later.

@bschwedler bschwedler merged commit a1b0159 into main Mar 26, 2026
7 checks passed
@bschwedler bschwedler deleted the rstudio-library-unittest branch March 26, 2026 11:37
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