-
Notifications
You must be signed in to change notification settings - Fork 13.3k
chore: federation-matrix integration tests #37219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 50 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
3c54a58
test: move tests to federation-matrix and finish all three tests
8bd09d1
test: undo changes in yarn.lock
b1d9578
test: undoing unecessary changes
6448895
test: Add element flag to test live with element
1ea5bb5
test: docker compose and integration test script running both local a…
9f23c9e
test: remove script directory from package root
05768ad
test: --image without args runs on latest rc image
3f84a29
test: undo yarn.lock changes
3838ea2
test: apply necessary changes to yarn.lock
6f36df7
test: remove unecessary traefix config
26b81bd
test: fixing automated code reviews
3270282
test: ignore integration tests in unit tests for federation-matrix
228b2e3
test: fix linting issues
837cb8f
test: fix review related to tls for synapse
e73ba17
test: add readme explaining how integration tests work and fix minor …
fc75ee1
test: renaming types and prettify
eaa3243
test: first draft of the pipeline job for federation testing
fd302f5
test: replace docker-compose with docker compose
09fa97c
test: debug commit
a96088d
test: more ci changes for debugging
40fff32
test: add certificates for rc1, hs1, and element along with .gitignor…
be67235
test: more debugging changes to the pipeline
17e4cdf
test: add some logging
c84cf28
test: change enterprise license and debug logging for federation test…
403ca57
test: bring back all pipeline jobs
dhulke ca997fa
test: remove storybook from tests
dhulke 51e39ab
test: enhance documentation for federation testing utilities and conf…
dhulke 310479f
test: fix integration tests
dhulke 93471f7
test: add second set of tests. Inviting users to non-federated privat…
dhulke e3cbdfb
test: getting rid of unecessary local variables and add room id valid…
dhulke 9a035a9
fix: federated in non federated room check (api)
dhulke 0b4be1f
fix: invite federated user to non federated room
dhulke 58b18b2
fix: slash command error message
dhulke d266105
test: add test cases and fix room creation logic to return error when…
dhulke 2171077
test: starting last set of room tests
dhulke b61e236
test: All room tests finished
dhulke efa7d47
test: starting message testing
dhulke 7676c44
Merge branch 'develop' into test/federation-integration
dhulke b95a811
test: fix yarn.lock
dhulke 41188bb
test: fix pipeline
dhulke 9915693
test: adding an exception for tests/data in .gitignore
dhulke 3853c0f
Merge branch 'develop' into test/federation-integration
dhulke 4ff80ac
fix: yarn.lock
dhulke 79abaef
test: update action version
dhulke 5865fdc
fix: download-artifact@v6
dhulke 66b8907
fix: skip cache if not present
dhulke e6d5115
Merge branch 'develop' into test/federation-integration
dhulke 929c0e1
fix: review
dhulke dd4cdae
Apply suggestion from @ggazzo
ggazzo c6b526c
Merge branch 'develop' into test/federation-integration
ggazzo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ storybook-static | |
| **/.vim/ | ||
|
|
||
| data/ | ||
| !**/tests/data/ | ||
| registration.yaml | ||
|
|
||
| storybook-static | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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', | ||
| }), | ||
| }); | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.