Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f22d8e0
Start somewhere...
supersven Sep 23, 2025
a012ce8
Do not send events from the simulated future
supersven Sep 23, 2025
e41001b
Receive the posted events
supersven Sep 23, 2025
2e347f3
Introduce sharding
supersven Sep 24, 2025
43e6d8e
Use random payloads of random length
supersven Sep 24, 2025
caf4f97
Make test parameters configurable
supersven Sep 24, 2025
4dcca7c
Add params to Helm chart
supersven Sep 24, 2025
9cac3cf
Run only testBench test in K8s
supersven Sep 24, 2025
5994bb4
Make the sharding group a cli parameter
supersven Sep 24, 2025
b21d83a
Don't setup what we don't need
supersven Sep 25, 2025
988d880
Improve error message
supersven Sep 26, 2025
9e6b1e6
Hack config for sven-test env
supersven Sep 26, 2025
40ff389
Only use released API versions
supersven Sep 26, 2025
c3d9d70
Remove log of sharding group assignment
supersven Sep 29, 2025
294ffd6
All users should have at least one client
supersven Sep 29, 2025
2312d99
Create fake data up to maxUserNo
supersven Sep 29, 2025
d86d368
Retry failed test setup functions
supersven Sep 29, 2025
e409883
Print message send delay
supersven Sep 29, 2025
5249c1d
Delete obsolete TODO
supersven Sep 29, 2025
c27899d
Use average payload size from prod
supersven Sep 29, 2025
7bdfcdf
Add maxDeliveryDelay config
supersven Sep 30, 2025
1f1d3b8
Use released API version
supersven Sep 30, 2025
889f60c
Remove more unused cruft
supersven Sep 30, 2025
df94f85
Start multiple instances in the integration Pod
supersven Sep 30, 2025
6b8dba2
Configure for dev cluster
supersven Sep 30, 2025
2b615c4
serve integration chart locally
supersven Oct 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ fake-aws fake-aws-s3 fake-aws-sqs aws-ingress fluent-bit kibana backoffice \
calling-test demo-smtp elasticsearch-curator elasticsearch-external \
elasticsearch-ephemeral minio-external cassandra-external \
ingress-nginx-controller nginx-ingress-services reaper restund \
k8ssandra-test-cluster ldap-scim-bridge wire-server-enterprise
k8ssandra-test-cluster ldap-scim-bridge wire-server-enterprise \
integration
KIND_CLUSTER_NAME := wire-server
HELM_PARALLELISM ?= 1 # 1 for sequential tests; 6 for all-parallel tests
# (run `psql -h localhost -p 5432 -d backendA -U wire-server -w` for the list of options for PSQL_DB)
Expand Down
11 changes: 8 additions & 3 deletions charts/integration/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ data:
apiPort: 5380
dohPort: 5381

originDomain: federation-test-helper.{{ .Release.Namespace }}.svc.cluster.local
# originDomain: federation-test-helper.{{ .Release.Namespace }}.svc.cluster.local
# sven-test.wire.link
originDomain: dev.zinfra.io

rabbitmq:
host: rabbitmq
port: 5671
adminHost: rabbitmq
adminPort: 15671
enableTls: true
adminPort: 15672
enableTls: false
insecureSkipVerifyTls: true
vHost: /

Expand Down Expand Up @@ -310,3 +312,6 @@ data:

integrationTestHostName: integration-headless.{{ .Release.Namespace }}.svc.cluster.local
cellsEventQueue: cells_events
shardingGroupCount: {{ .Values.config.shardingGroupCount }}
maxUserNo: {{ .Values.config.maxUserNo }}
maxDeliveryDelay: {{ .Values.config.maxDeliveryDelay }}
162 changes: 23 additions & 139 deletions charts/integration/templates/integration-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
secret:
secretName: "brig"

- name: "turn-servers"
configMap:
name: "turn"

- name: "cannon-config"
configMap:
name: "cannon"
Expand Down Expand Up @@ -65,22 +61,6 @@
configMap:
name: "background-worker"

- name: "background-worker-secrets"
secret:
secretName: "background-worker"

- name: "stern-config"
configMap:
name: "backoffice"

- name: "proxy-config"
configMap:
name: "proxy"

- name: "proxy-secrets"
secret:
secretName: "proxy"

- name: "nginz-config"
configMap:
name: "nginz"
Expand All @@ -89,28 +69,12 @@
secret:
secretName: "nginz"

- name: elasticsearch-ca
secret:
secretName: {{ .Values.config.elasticsearch.tlsCaSecretRef.name }}

- name: redis-ca
secret:
secretName: {{ .Values.config.redis.tlsCaSecretRef.name }}

- name: rabbitmq-ca
secret:
secretName: {{ .Values.config.rabbitmq.tlsCaSecretRef.name }}

{{- if eq (include "useCassandraTLS" .Values.config) "true" }}
- name: integration-cassandra
secret:
secretName: {{ include "cassandraTlsSecretName" .Values.config }}
{{- end }}

- name: wire-server-enterprise-config
configMap:
name: wire-server-enterprise

restartPolicy: Never

initContainers:
Expand All @@ -121,14 +85,10 @@
{{- toYaml .Values.podSecurityContext | nindent 6 }}
{{- end }}
volumeMounts:
- name: elasticsearch-ca
mountPath: "/certs/elasticsearch"
{{- if eq (include "useCassandraTLS" .Values.config) "true" }}
- name: "integration-cassandra"
mountPath: "/certs/cassandra"
{{- end }}
- name: rabbitmq-ca
mountPath: /certs/rabbitmq-ca
env:
- name: INTEGRATION_DYNAMIC_BACKENDS_POOLSIZE
value: "{{ .Values.config.dynamicBackendsPoolsize }}"
Expand All @@ -141,60 +101,48 @@
- name: RABBITMQ_USERNAME
valueFrom:
secretKeyRef:
name: brig
name: gundeck
key: rabbitmqUsername
- name: RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: brig
name: gundeck
key: rabbitmqPassword
command:
- /bin/sh
- -c
- |
set -euo pipefail
# FUTUREWORK: Do all of this in the integration test binary
integration-dynamic-backends-db-schemas.sh \
--host {{ .Values.config.cassandra.host }} \
--port {{ .Values.config.cassandra.port }} \
--replication-factor {{ .Values.config.cassandra.replicationFactor }} \
{{- if eq (include "useCassandraTLS" .Values.config) "true" }}
--tls-ca-certificate-file /certs/cassandra/{{- include "cassandraTlsSecretKey" .Values.config }}
{{ end }}

integration-dynamic-backends-brig-index.sh \
--elasticsearch-server https://elastic:changeme@{{ .Values.config.elasticsearch.host }}:9200 \
--elasticsearch-ca-cert /certs/elasticsearch/{{ .Values.config.elasticsearch.tlsCaSecretRef.key }}
integration-dynamic-backends-ses.sh {{ .Values.config.sesEndpointUrl }}
integration-dynamic-backends-s3.sh {{ .Values.config.s3EndpointUrl }}

{{- range $name, $dynamicBackend := .Values.config.dynamicBackends }}
integration-dynamic-backends-vhosts.sh {{ $.Values.config.rabbitmqPutVHostUrl }} {{ $dynamicBackend.federatorExternalHostPrefix}}.{{ $.Release.Namespace }}.svc.cluster.local

Check warning on line 118 in charts/integration/templates/integration-integration.yaml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add a whitespace before "}}" in the template directive.

See more on https://sonarcloud.io/project/issues?id=wireapp_wire-server&issues=AZrpu3GGEAUtN0e-rpGz&open=AZrpu3GGEAUtN0e-rpGz&pullRequest=4789
{{- end }}
resources:
requests:
memory: "512Mi"
cpu: "2"

containers:

Check warning on line 125 in charts/integration/templates/integration-integration.yaml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Bind this resource's automounted service account to RBAC or disable automounting.

See more on https://sonarcloud.io/project/issues?id=wireapp_wire-server&issues=AZrpu3GGEAUtN0e-rpGy&open=AZrpu3GGEAUtN0e-rpGy&pullRequest=4789
- name: integration
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- if eq (include "includeSecurityContext" .) "true" }}
{{- range $i := until (int .Values.config.shardingGroupCount) }}
- name: "integration-{{ int $i}}"

Check warning on line 127 in charts/integration/templates/integration-integration.yaml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Specify a memory limit for this container.

See more on https://sonarcloud.io/project/issues?id=wireapp_wire-server&issues=AZrpu3GGEAUtN0e-rpGw&open=AZrpu3GGEAUtN0e-rpGw&pullRequest=4789

Check warning on line 127 in charts/integration/templates/integration-integration.yaml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Specify a storage request for this container.

See more on https://sonarcloud.io/project/issues?id=wireapp_wire-server&issues=AZrpu3GGEAUtN0e-rpGx&open=AZrpu3GGEAUtN0e-rpGx&pullRequest=4789

Check warning on line 127 in charts/integration/templates/integration-integration.yaml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add a whitespace before "}}" in the template directive.

See more on https://sonarcloud.io/project/issues?id=wireapp_wire-server&issues=AZrpu3GGEAUtN0e-rpG0&open=AZrpu3GGEAUtN0e-rpG0&pullRequest=4789
image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag }}"
{{- if eq (include "includeSecurityContext" $) "true" }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 6 }}
{{- toYaml $.Values.podSecurityContext | nindent 6 }}
{{- end }}
command:
- /bin/bash
- -c
- |
set -euo pipefail

if integration --config /etc/wire/integration/integration.yaml; then
if TEST_INCLUDE=testBench integration --config /etc/wire/integration/integration.yaml --sharding-group {{ $i }}; then
exit_code=$?
else
exit_code=$?
fi

{{- if .Values.config.uploadXml }}
{{- if $.Values.config.uploadXml }}
# In case a different S3 compliant storage is used to upload test result.
if ! [[ -z "${UPLOAD_XML_AWS_ACCESS_KEY_ID+x}" ]]; then
export AWS_ACCESS_KEY_ID="$UPLOAD_XML_AWS_ACCESS_KEY_ID"
Expand All @@ -210,7 +158,7 @@
resources:
requests:
memory: "512Mi"
cpu: "2"
cpu: "0.5"
volumeMounts:

- name: integration-config
Expand All @@ -228,9 +176,6 @@
- name: brig-secrets
mountPath: /etc/wire/brig/secrets

- name: turn-servers
mountPath: /etc/wire/brig/turn

- name: cannon-config
mountPath: /etc/wire/cannon/conf

Expand All @@ -243,58 +188,13 @@
- name: spar-config
mountPath: /etc/wire/spar/conf

- name: federator-config
mountPath: /etc/wire/federator/conf

- name: federator-secrets
mountPath: /etc/wire/federator/secrets

- name: federator-ca
mountPath: /etc/wire/federator/ca

- name: background-worker-config
mountPath: /etc/wire/background-worker/conf

- name: background-worker-secrets
mountPath: /etc/wire/background-worker/secrets

- name: stern-config
mountPath: /etc/wire/stern/conf

- name: proxy-config
mountPath: /etc/wire/proxy/conf

- name: proxy-secrets
mountPath: /etc/wire/proxy/secrets

- name: nginz-config
mountPath: /etc/wire/nginz/conf

- name: nginz-secrets
mountPath: /etc/wire/nginz/secrets

- name: elasticsearch-ca
mountPath: /etc/wire/brig/elasticsearch-ca

- name: redis-ca
mountPath: /etc/wire/gundeck/redis-ca

- name: rabbitmq-ca
mountPath: /etc/wire/brig/rabbitmq-ca

- name: rabbitmq-ca
mountPath: /etc/wire/galley/rabbitmq-ca

- name: rabbitmq-ca
mountPath: /etc/wire/background-worker/rabbitmq-ca

- name: rabbitmq-ca
mountPath: /etc/wire/gundeck/rabbitmq-ca

- name: rabbitmq-ca
mountPath: /etc/wire/cannon/rabbitmq-ca

{{- if eq (include "useCassandraTLS" .Values.config) "true" }}
{{- if eq (include "useCassandraTLS" $.Values.config) "true" }}
- name: "integration-cassandra"
mountPath: "/certs"

Expand All @@ -311,9 +211,6 @@
mountPath: "/etc/wire/spar/cassandra"
{{- end }}

- name: wire-server-enterprise-config
mountPath: /etc/wire/wire-server-enterprise/conf

env:
# these dummy values are necessary for Amazonka's "Discover"
- name: AWS_ACCESS_KEY_ID
Expand All @@ -325,35 +222,21 @@
- name: RABBITMQ_USERNAME
valueFrom:
secretKeyRef:
name: brig
name: gundeck
key: rabbitmqUsername
- name: RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: brig
name: gundeck
key: rabbitmqPassword
- name: RABBITMQ_USERNAME_V0
value: "wire-server"
- name: RABBITMQ_PASSWORD_V0
valueFrom:
secretKeyRef:
name: rabbitmq-v0
key: rabbitmq-password
- name: RABBITMQ_USERNAME_V1
value: "wire-server"
- name: RABBITMQ_PASSWORD_V1
valueFrom:
secretKeyRef:
name: rabbitmq-v1
key: rabbitmq-password
{{- if hasKey .Values.secrets "redisUsername" }}
{{- if hasKey $.Values.secrets "redisUsername" }}
- name: REDIS_USERNAME
valueFrom:
secretKeyRef:
name: integration
key: redisUsername
{{- end }}
{{- if hasKey .Values.secrets "redisPassword" }}
{{- if hasKey $.Values.secrets "redisPassword" }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
Expand All @@ -362,10 +245,10 @@
{{- end }}
- name: TEST_XML
value: /tmp/result.xml
{{- if .Values.config.uploadXml }}
{{- if $.Values.config.uploadXml }}
- name: UPLOAD_XML_S3_BASE_URL
value: {{ .Values.config.uploadXml.baseUrl }}
{{- if .Values.secrets.uploadXmlAwsAccessKeyId }}
value: {{ $.Values.config.uploadXml.baseUrl }}
{{- if $.Values.secrets.uploadXmlAwsAccessKeyId }}
- name: UPLOAD_XML_AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
Expand All @@ -379,8 +262,9 @@
{{- end }}
{{- end }}
- name: ENABLE_FEDERATION_V0
value: "1"
value: "0"
- name: ENABLE_FEDERATION_V1
value: "1"
value: "0"
- name: ENABLE_FEDERATION_V2
value: "1"
value: "0"
{{- end }}
9 changes: 6 additions & 3 deletions charts/integration/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ podSecurityContext:
type: RuntimeDefault

config:
dynamicBackendsPoolsize: 3
dynamicBackendsPoolsize: 0
dynamicBackends:
dynamic-backend-1:
federatorExternalHostPrefix: dynamic-backend-1
Expand Down Expand Up @@ -118,8 +118,11 @@ config:
sqsEndpointUrl: http://fake-aws-sqs:4568
sesEndpointUrl: http://fake-aws-ses:4569
s3EndpointUrl: http://fake-aws-s3:9000
rabbitmqPutVHostUrl: http://rabbitmq:15672/api/vhosts

rabbitmqPutVHostUrl: http://rabbitmq-b.databases.svc.cluster.local:15672/api/vhosts
shardingGroupCount: 3
# shardingGroup: 0
maxUserNo: 1000
maxDeliveryDelay: 120
tls:
verify_depth: 1
# Namespace from which to obtain the secret containing the CA trusted by
Expand Down
2 changes: 2 additions & 0 deletions integration/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
, split
, stm
, streaming-commons
, streamly
, string-conversions
, system-linux-proc
, tagged
Expand Down Expand Up @@ -179,6 +180,7 @@ mkDerivation {
split
stm
streaming-commons
streamly
string-conversions
system-linux-proc
tagged
Expand Down
2 changes: 2 additions & 0 deletions integration/integration.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ library
Test.MLS.Unreachable
Test.NginxZAuthModule
Test.Notifications
Test.NotificationsBenchmark
Test.OAuth
Test.PasswordReset
Test.Presence
Expand Down Expand Up @@ -299,6 +300,7 @@ library
, split
, stm
, streaming-commons
, streamly
, string-conversions
, system-linux-proc
, tagged
Expand Down
Loading