oncall-engine/helm/oncall/tests/smtp_env_test.yaml
Sean Wood 61a657b0cd
Allow setting email app to use SSL instead of TLS (#3911)
# What this PR does
Adds flexibility of the method of encryption in the SMTP email app. Some
email servers are configured to use port 465 (intrinsic TLS) which
requires `EMAIL_USE_SSL` instead of `EMAIL_USE_TLS`.

## Which issue(s) this PR fixes
Fixes https://github.com/grafana/oncall/issues/1044

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `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>
2024-02-20 03:38:09 -05:00

53 lines
1.4 KiB
YAML

suite: test SMTP/Email envs for deployments
templates:
- engine/deployment.yaml
release:
name: oncall
tests:
- it: smtp.ssl -> mutually exclusive with smtp.tls default
set:
oncall.smtp:
ssl: "True"
asserts:
- failedTemplate:
errorMessage: cannot set Email (SMTP) to use SSL and TLS at the same time
- it: smtp.ssl -> mutually exclusive with smtp.tls set
set:
oncall.smtp:
tls: "True"
ssl: "True"
asserts:
- failedTemplate:
errorMessage: cannot set Email (SMTP) to use SSL and TLS at the same time
- it: smtp.ssl -> mutually exclusive with smtp.tls disabled
set:
oncall.smtp:
tls: "False"
ssl: "True"
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: EMAIL_USE_TLS
value: "False"
- contains:
path: spec.template.spec.containers[0].env
content:
name: EMAIL_USE_SSL
value: "True"
- it: smtp.tls -> mutually exclusive with smtp.ssl disabled
set:
oncall.smtp:
tls: "True"
ssl: "False"
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: EMAIL_USE_TLS
value: "True"
- contains:
path: spec.template.spec.containers[0].env
content:
name: EMAIL_USE_SSL
value: "False"