Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f3d88c8
test: initial draft of integration tests for federation
Oct 10, 2025
3c54a58
test: move tests to federation-matrix and finish all three tests
Oct 13, 2025
8bd09d1
test: undo changes in yarn.lock
Oct 20, 2025
b1d9578
test: undoing unecessary changes
Oct 15, 2025
6448895
test: Add element flag to test live with element
Oct 19, 2025
1ea5bb5
test: docker compose and integration test script running both local a…
Oct 20, 2025
9f23c9e
test: remove script directory from package root
Oct 20, 2025
05768ad
test: --image without args runs on latest rc image
Oct 21, 2025
3f84a29
test: undo yarn.lock changes
Oct 21, 2025
3838ea2
test: apply necessary changes to yarn.lock
Oct 21, 2025
6f36df7
test: remove unecessary traefix config
Oct 22, 2025
26b81bd
test: fixing automated code reviews
Oct 22, 2025
3270282
test: ignore integration tests in unit tests for federation-matrix
Oct 22, 2025
228b2e3
test: fix linting issues
Oct 22, 2025
837cb8f
test: fix review related to tls for synapse
Oct 22, 2025
e73ba17
test: add readme explaining how integration tests work and fix minor …
Oct 22, 2025
fc75ee1
test: renaming types and prettify
Oct 23, 2025
eaa3243
test: first draft of the pipeline job for federation testing
Oct 23, 2025
fd302f5
test: replace docker-compose with docker compose
Oct 23, 2025
09fa97c
test: debug commit
Oct 23, 2025
a96088d
test: more ci changes for debugging
Oct 23, 2025
40fff32
test: add certificates for rc1, hs1, and element along with .gitignor…
Oct 23, 2025
be67235
test: more debugging changes to the pipeline
Oct 23, 2025
17e4cdf
test: add some logging
Oct 23, 2025
c84cf28
test: change enterprise license and debug logging for federation test…
Oct 25, 2025
403ca57
test: bring back all pipeline jobs
dhulke Oct 25, 2025
ca997fa
test: remove storybook from tests
dhulke Oct 25, 2025
51e39ab
test: enhance documentation for federation testing utilities and conf…
dhulke Oct 26, 2025
310479f
test: fix integration tests
dhulke Oct 26, 2025
93471f7
test: add second set of tests. Inviting users to non-federated privat…
dhulke Oct 26, 2025
e3cbdfb
test: getting rid of unecessary local variables and add room id valid…
dhulke Oct 26, 2025
9a035a9
fix: federated in non federated room check (api)
dhulke Oct 26, 2025
0b4be1f
fix: invite federated user to non federated room
dhulke Oct 26, 2025
58b18b2
fix: slash command error message
dhulke Oct 27, 2025
d266105
test: add test cases and fix room creation logic to return error when…
dhulke Oct 27, 2025
2171077
test: starting last set of room tests
dhulke Oct 28, 2025
b61e236
test: All room tests finished
dhulke Oct 28, 2025
efa7d47
test: starting message testing
dhulke Nov 9, 2025
7676c44
Merge branch 'develop' into test/federation-integration
dhulke Nov 9, 2025
b95a811
test: fix yarn.lock
dhulke Nov 9, 2025
41188bb
test: fix pipeline
dhulke Nov 9, 2025
9915693
test: adding an exception for tests/data in .gitignore
dhulke Nov 10, 2025
3853c0f
Merge branch 'develop' into test/federation-integration
dhulke Nov 14, 2025
4ff80ac
fix: yarn.lock
dhulke Nov 14, 2025
79abaef
test: update action version
dhulke Nov 14, 2025
5865fdc
fix: download-artifact@v6
dhulke Nov 14, 2025
66b8907
fix: skip cache if not present
dhulke Nov 15, 2025
e6d5115
Merge branch 'develop' into test/federation-integration
dhulke Nov 15, 2025
929c0e1
fix: review
dhulke Nov 15, 2025
dd4cdae
Apply suggestion from @ggazzo
ggazzo Nov 17, 2025
c6b526c
Merge branch 'develop' into test/federation-integration
ggazzo Nov 17, 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
65 changes: 59 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,12 @@ jobs:
fail-fast: false
matrix:
arch: [arm64, amd64]
service: [
[authorization-service, queue-worker-service, ddp-streamer-service],
[account-service, presence-service, stream-hub-service, omnichannel-transcript-service],
[rocketchat]
]
service:
[
[authorization-service, queue-worker-service, ddp-streamer-service],
[account-service, presence-service, stream-hub-service, omnichannel-transcript-service],
[rocketchat],
]
type:
# if running in a PR build with coverage
- ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}
Expand Down Expand Up @@ -607,6 +608,54 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
REPORTER_JIRA_ROCKETCHAT_API_KEY: ${{ secrets.REPORTER_JIRA_ROCKETCHAT_API_KEY }}

test-federation-matrix:
name: 🔨 Test Federation Matrix
needs: [checks, build-gh-docker-publish, packages-build, release-versions]
runs-on: ubuntu-24.04-arm

steps:
- uses: actions/checkout@v5

- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
cache-modules: true
install: true

- uses: rharkor/caching-for-turbo@v1.8

- name: Restore turbo build
uses: actions/download-artifact@v6
continue-on-error: true
with:
name: turbo-build
path: .turbo/cache

- name: Build packages
run: yarn build

- name: Login to GitHub Container Registry
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}

- name: Configure /etc/hosts for federation services
run: |
sudo -- sh -c "echo '127.0.0.1 hs1' >> /etc/hosts"
sudo -- sh -c "echo '127.0.0.1 rc1' >> /etc/hosts"

- name: Run federation integration tests with pre-built image
working-directory: ./ee/packages/federation-matrix
env:
ROCKETCHAT_IMAGE: ghcr.io/${{ needs.release-versions.outputs.lowercase-repo }}/rocket.chat:${{ needs.release-versions.outputs.gh-docker-tag }}
ENTERPRISE_LICENSE_RC1: ${{ secrets.ENTERPRISE_LICENSE_RC1 }}
run: yarn test:integration --image "${ROCKETCHAT_IMAGE}"

report-coverage:
name: 📊 Report Coverage
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -662,7 +711,7 @@ jobs:
tests-done:
name: ✅ Tests Done
runs-on: ubuntu-24.04-arm
needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-ui-ee-watcher]
needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-ui-ee-watcher, test-federation-matrix]
if: always()
steps:
- name: Test finish aggregation
Expand Down Expand Up @@ -695,6 +744,10 @@ jobs:
exit 1
fi

if [[ '${{ needs.test-federation-matrix.result }}' != 'success' ]]; then
exit 1
fi

echo finished

deploy:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ storybook-static
**/.vim/

data/
!**/tests/data/
registration.yaml

storybook-static
Expand Down
52 changes: 52 additions & 0 deletions apps/meteor/tests/data/messages.helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { IRoom } from '@rocket.chat/core-typings';

import { credentials, methodCall, request } from './api-data';
import type { IRequestConfig } from './users.helper';

type SendMessageParams = {
rid: IRoom['_id'];
msg: string;
config?: IRequestConfig;
};

/**
* Sends a text message to a room using the method.call/sendMessage DDP endpoint.
*
* This helper function allows sending messages to rooms (channels, groups, DMs)
* for federation testing scenarios using the DDP method format. It supports
* custom request configurations for cross-domain federation testing.
*
* @param rid - The unique identifier of the room
* @param msg - The message text to send
* @param config - Optional request configuration for custom domains
* @returns Promise resolving to the API response
*/
export const sendMessage = ({ rid, msg, config }: SendMessageParams) => {
if (!rid) {
throw new Error('"rid" is required in "sendMessage" test helper');
}
if (!msg) {
throw new Error('"msg" is required in "sendMessage" test helper');
}

const requestInstance = config?.request || request;
const credentialsInstance = config?.credentials || credentials;

return requestInstance
.post(methodCall('sendMessage'))
.set(credentialsInstance)
.send({
message: JSON.stringify({
method: 'sendMessage',
params: [
{
_id: `${Date.now()}-${Math.random()}`,
rid,
msg,
},
],
id: `${Date.now()}-${Math.random()}`,
msg: 'method',
}),
});
};
Loading
Loading