Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions changelog.d/5-internal/fix-local-fed-v1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Local integration tests of federation version V1 fixed
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@ listen 8090;
# But to also test tls forwarding, this port can be used.
# This applies only locally, as for kubernetes (helm chart) based deployments,
# TLS is terminated at the ingress level, not at nginz level
listen 8443 ssl;
listen [::]:8443 ssl;

http2 on;
listen 8443 ssl http2;
listen [::]:8443 ssl http2;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@ listen 8090;
# But to also test tls forwarding, this port can be used.
# This applies only locally, as for kubernetes (helm chart) based deployments,
# TLS is terminated at the ingress level, not at nginz level
listen 8443 ssl;
listen [::]:8443 ssl;

http2 on;
listen 8443 ssl http2;
listen [::]:8443 ssl http2;
11 changes: 7 additions & 4 deletions deploy/dockerephemeral/run.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
#!/usr/bin/env bash

# To start the federation v0, v1 backends, set ENABLE_FEDERATION_V0=1, ENABLE_FEDERATION_V1=1
# in the env where this script is run

set -e

# run.sh should work no matter what is the current directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DOCKER_FILE="$SCRIPT_DIR/docker-compose.yaml"
FED_VERSIONS=(0 1)

opts=( "--file" "$DOCKER_FILE" )
opts=("--file" "$DOCKER_FILE")
for v in "${FED_VERSIONS[@]}"; do
var="ENABLE_FEDERATION_V$v"
if [[ "${!var}" == 1 ]]; then
opts+=( "--file" "$SCRIPT_DIR/federation-v$v.yaml" )
opts+=("--file" "$SCRIPT_DIR/federation-v$v.yaml")
fi
done

dc() {
docker-compose "${opts[@]}" "$@"
}

cleanup () {
cleanup() {
dc down
}

Expand Down
4 changes: 4 additions & 0 deletions integration/test/Test/MLS/One2One.hs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ testMLSGhostOne2OneConv = do
-- still be created but only by the user whose backend hosts this conversation.

-- | See Note: [Federated 1:1 MLS Conversations]
-- To run locally this test requires federation-v1 docker containers to be up and running.
-- See `deploy/dockerephemeral/run.sh` and comment on `StaticFedDomain` in `Testlib/VersionedFed.hs` for more details.
testMLSFederationV1ConvOnOldBackend :: App ()
testMLSFederationV1ConvOnOldBackend = do
alice <- randomUser OwnDomain def
Expand Down Expand Up @@ -447,6 +449,8 @@ testMLSFederationV1ConvOnOldBackend = do
parsedMsg %. "message.content.sender.External" `shouldMatchInt` 0

-- | See Note: Federated 1:1 MLS Conversations
-- To run locally this test requires federation-v1 docker containers to be up and running.
-- See `deploy/dockerephemeral/run.sh` and comment on `StaticFedDomain` in `Testlib/VersionedFed.hs` for more details.
testMLSFederationV1ConvOnNewBackend :: App ()
testMLSFederationV1ConvOnNewBackend = do
alice <- randomUser OwnDomain def
Expand Down