Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start experimenting with helm unittesting #611

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/rstudio-workbench/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Makefile
*.gotmpl

# chart tests
tests/
tests/*
2 changes: 1 addition & 1 deletion charts/rstudio-workbench/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rstudio-workbench
description: Official Helm chart for Posit Workbench
version: 0.8.7
version: 0.8.8
apiVersion: v2
appVersion: 2024.09.1
icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
Expand Down
6 changes: 3 additions & 3 deletions charts/rstudio-workbench/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Posit Workbench

![Version: 0.8.7](https://img.shields.io/badge/Version-0.8.7-informational?style=flat-square) ![AppVersion: 2024.09.1](https://img.shields.io/badge/AppVersion-2024.09.1-informational?style=flat-square)
![Version: 0.8.8](https://img.shields.io/badge/Version-0.8.8-informational?style=flat-square) ![AppVersion: 2024.09.1](https://img.shields.io/badge/AppVersion-2024.09.1-informational?style=flat-square)

#### _Official Helm chart for Posit Workbench_

Expand All @@ -24,11 +24,11 @@ To ensure a stable production deployment:

## Installing the chart

To install the chart with the release name `my-release` at version 0.8.7:
To install the chart with the release name `my-release` at version 0.8.8:

```{.bash}
helm repo add rstudio https://helm.rstudio.com
helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.7
helm upgrade --install my-release rstudio/rstudio-workbench --version=0.8.8
```

To explore other chart versions, look at:
Expand Down
54 changes: 54 additions & 0 deletions charts/rstudio-workbench/tests/service_accounts_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
suite: Workbench Service Accounts
templates:
- configmap-general.yaml
- configmap-prestart.yaml
- configmap-secret.yaml
- configmap-session.yaml
- deployment.yaml
tests:
- it: should set the Workbench pod service account when the launcher is enabled
template: deployment.yaml
set:
launcher:
enabled: true
rbac:
serviceAccount:
name: "workbench-service-account"
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "workbench-service-account"
- it: should set the Workbench pod service account when the launcher is not enabled
template: deployment.yaml
set:
launcher:
enabled: false
rbac:
serviceAccount:
name: "workbench-service-account"
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "workbench-service-account"
- it: should use the default serviceAccount name when not set
template: deployment.yaml
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "RELEASE-NAME-rstudio-workbench"
- it: should use the nameOverride as part of the serviceAccount name when nameOverride is set
template: deployment.yaml
set:
nameOverride: "posit-workbench"
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "RELEASE-NAME-posit-workbench"
- it: should use the fullnameOverride as the serviceAccount name when fullnameOverride is set
template: deployment.yaml
set:
fullnameOverride: "posit-workbench"
asserts:
- equal:
path: "spec.template.spec.serviceAccountName"
value: "posit-workbench"