Files
buzz/deploy/charts/buzz/tests/validation_test.yaml
Tyler f584bbd971 feat(chart): add relay horizontal autoscaling (#2077)
Signed-off-by: npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf <95cae996907d7cab9f5dbf43c0f53edeac6ab0b032a6feae4abfd784e467b3f5@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf <95cae996907d7cab9f5dbf43c0f53edeac6ab0b032a6feae4abfd784e467b3f5@sprout-oss.stage.blox.sqprod.co>
2026-07-18 15:38:48 -04:00

69 lines
2.3 KiB
YAML

suite: validation
templates:
- templates/deployment.yaml
tests:
- it: fails when relayUrl is missing
set:
relayUrl: ""
ownerPubkey: "0000000000000000000000000000000000000000000000000000000000000000"
externalPostgresql.url: postgres://u:p@h:5432/d
asserts:
- failedTemplate:
errorMessage: "relayUrl is required: set --set relayUrl=wss://your.domain"
- it: fails when ownerPubkey is missing and requireRelayMembership is true
set:
relayUrl: wss://buzz.example.com
ownerPubkey: ""
externalPostgresql.url: postgres://u:p@h:5432/d
asserts:
- failedTemplate:
errorPattern: "ownerPubkey is required when relay.requireRelayMembership=true"
- it: fails when ownerPubkey is not 64 lowercase hex (schema-level)
set:
relayUrl: wss://buzz.example.com
ownerPubkey: "NOTAHEX"
externalPostgresql.url: postgres://u:p@h:5432/d
asserts:
- failedTemplate:
errorPattern: "ownerPubkey: Does not match pattern"
- it: fails when replicaCount>1 without Redis
set:
relayUrl: wss://buzz.example.com
ownerPubkey: "0000000000000000000000000000000000000000000000000000000000000000"
externalPostgresql.url: postgres://u:p@h:5432/d
replicaCount: 3
asserts:
- failedTemplate:
errorPattern: "minimum replica count 3 requires Redis"
- it: fails when ingress and httproute both enabled
set:
relayUrl: wss://buzz.example.com
ownerPubkey: "0000000000000000000000000000000000000000000000000000000000000000"
externalPostgresql.url: postgres://u:p@h:5432/d
ingress.enabled: true
httproute.enabled: true
asserts:
- failedTemplate:
errorPattern: "cannot both be true"
- it: fails when Postgres source is missing
set:
relayUrl: wss://buzz.example.com
ownerPubkey: "0000000000000000000000000000000000000000000000000000000000000000"
asserts:
- failedTemplate:
errorPattern: "Postgres source missing"
- it: fails when S3/object-storage source is missing
set:
relayUrl: wss://buzz.example.com
ownerPubkey: "0000000000000000000000000000000000000000000000000000000000000000"
externalPostgresql.url: postgres://u:p@h:5432/d
asserts:
- failedTemplate:
errorPattern: "S3/object-storage source missing"