# What this PR does Runs Telegram long polling to get updates. It's enabled by setting `FEATURE_TELEGRAM_LONG_POLLING_ENABLED=True`. That will disable webhook and run separate deployment for telegram long polling. Telegram long polling is not very HA mode, but it does not need to expose webhook url to internet and simplifies telegram integration. ## Which issue(s) this PR fixes closes #561 ## 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)
146 lines
4.2 KiB
YAML
146 lines
4.2 KiB
YAML
suite: test PostgreSQL envs for deployments
|
|
templates:
|
|
- engine/deployment.yaml
|
|
- engine/job-migrate.yaml
|
|
- celery/deployment.yaml
|
|
- telegram-polling/deployment.yaml
|
|
release:
|
|
name: oncall
|
|
tests:
|
|
- it: postgresql.enabled=false -> external PostgreSQL default settings
|
|
set:
|
|
telegramPolling.enabled: true
|
|
database.type: postgresql
|
|
postgresql.enabled: false
|
|
externalPostgresql.host: custom-postgres-host
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_TYPE
|
|
value: postgresql
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_NAME
|
|
value: oncall
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_PORT
|
|
value: "5432"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_USER
|
|
value: postgres
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_HOST
|
|
value: custom-postgres-host
|
|
|
|
- it: externalPostgresql -> should use external PostgreSQL custom settings
|
|
set:
|
|
telegramPolling.enabled: true
|
|
database.type: postgresql
|
|
postgresql.enabled: false
|
|
externalPostgresql:
|
|
host: test-host
|
|
port: 5555
|
|
db_name: grafana_oncall
|
|
user: test_user
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_TYPE
|
|
value: postgresql
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_NAME
|
|
value: grafana_oncall
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_PORT
|
|
value: "5555"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_USER
|
|
value: test_user
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_HOST
|
|
value: test-host
|
|
|
|
- it: postgresql.enabled=true -> internal PostgreSQL default settings
|
|
set:
|
|
telegramPolling.enabled: true
|
|
database.type: postgresql
|
|
postgresql.enabled: true
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_TYPE
|
|
value: postgresql
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_NAME
|
|
value: oncall
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_PORT
|
|
value: "5432"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_USER
|
|
value: postgres
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_HOST
|
|
value: oncall-postgresql
|
|
|
|
- it: postgresql.auth -> should use internal PostgreSQL custom settings
|
|
set:
|
|
telegramPolling.enabled: true
|
|
database.type: postgresql
|
|
postgresql:
|
|
enabled: true
|
|
auth:
|
|
database: grafana_oncall
|
|
username: grafana_oncall
|
|
asserts:
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_TYPE
|
|
value: postgresql
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_NAME
|
|
value: grafana_oncall
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_PORT
|
|
value: "5432"
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_USER
|
|
value: grafana_oncall
|
|
- contains:
|
|
path: spec.template.spec.containers[0].env
|
|
content:
|
|
name: DATABASE_HOST
|
|
value: oncall-postgresql
|