Files
actions-runner-controller/charts/gha-runner-scale-set-dev/tests/github_secret_annotations_test.yaml
Nikola Jokic d28d439597 add tests
2026-01-16 18:14:17 +01:00

50 lines
1.4 KiB
YAML

suite: "Test GitHub Secret Annotations"
templates:
- githubsecret.yaml
tests:
- it: should include global annotations
set:
scaleset.name: "test"
auth.url: "https://github.com/org"
auth.githubToken: "gh_token12345"
resource:
all:
metadata:
annotations:
a: "global"
shared: "global"
release:
name: "test-name"
namespace: "test-namespace"
asserts:
- equal:
path: metadata.annotations.a
value: "global"
- equal:
path: metadata.annotations.shared
value: "global"
- it: should drop actions.github.com annotations from global config
set:
scaleset.name: "test"
auth.url: "https://github.com/org"
auth.githubToken: "gh_token12345"
resource:
all:
metadata:
annotations:
ok: "ok"
actions.github.com/values-hash: "user-value"
actions.github.com/cleanup-something: "should-not-render"
release:
name: "test-name"
namespace: "test-namespace"
asserts:
- equal:
path: metadata.annotations.ok
value: "ok"
- notExists:
path: metadata.annotations["actions.github.com/values-hash"]
- notExists:
path: metadata.annotations["actions.github.com/cleanup-something"]