# What this PR does When configuring twilio auth only the provided values are templated. ## Which issue(s) this PR fixes https://github.com/grafana/oncall/issues/2654 ## Checklist - [X] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Joey Orlando <joey.orlando@grafana.com> Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
suite: test Twilio auth envs for deployments
|
|
release:
|
|
name: oncall
|
|
templates:
|
|
- engine/deployment.yaml
|
|
tests:
|
|
- it: snippet.oncall.twilio.env -> should succeed if only apiKeySid and apiKeySecret are set
|
|
set:
|
|
oncall.twilio.existingSecret: unittest-secret
|
|
oncall.twilio.accountSid: "acc-sid"
|
|
oncall.twilio.phoneNumberKey: "phone-key"
|
|
oncall.twilio.verifySidKey: "verify-sid-key"
|
|
oncall.twilio.apiKeySidKey: "api-sid-key"
|
|
oncall.twilio.apiKeySecretKey: "api-secret-key"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: TWILIO_API_KEY_SID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: api-sid-key
|
|
name: unittest-secret
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: TWILIO_API_KEY_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: api-secret-key
|
|
name: unittest-secret
|
|
|
|
- it: snippet.oncall.twilio.env -> should succeed if only authToken is set
|
|
set:
|
|
oncall.twilio.existingSecret: unittest-secret
|
|
oncall.twilio.accountSid: "acc-sid"
|
|
oncall.twilio.verifySidKey: "verify-sid-key"
|
|
oncall.twilio.phoneNumberKey: "phone-key"
|
|
oncall.twilio.authTokenKey: "auth-token-key"
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: TWILIO_AUTH_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: auth-token-key
|
|
name: unittest-secret
|