mirror of
https://github.com/actions/actions-runner-controller.git
synced 2026-01-18 09:45:14 +08:00
add tests
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user