Skip to content

Draft: Start supporting integration tests#4

Closed
selfhoster1312 wants to merge 1671 commits intomatterbridge-org:masterfrom
selfhoster1312:test-xmpp
Closed

Draft: Start supporting integration tests#4
selfhoster1312 wants to merge 1671 commits intomatterbridge-org:masterfrom
selfhoster1312:test-xmpp

Conversation

@selfhoster1312
Copy link
Copy Markdown
Collaborator

This is very early work. Definitely not ready for review, but i thought i'd get it out here to show what i'm working on.

The idea is each protocol can have its own integration tests to verify that messages actually come through a remote server. This is in my opinion more useful than unit tests, and would allow in the future to actually test the feature matrix matterbridge-org/community#7

Hopefully the test passes here?! It passes locally (with go/prosody/prosody-modules installed) when running tests/test.sh xmpp outgoing-message. Here's the output it produces for the moment:

[xmpp] Starting setup.sh
[xmpp] Started setup.sh successfully
[xmpp] Starting matterbridge
[xmpp] Started matterbridge successfully
[xmpp] Successful setup steps… Continuing.
[xmpp] Protocol client ready to start test.
[xmpp] matterbrige took more than 5 seconds to quit. See tests/xmpp/matterbridge.log
[xmpp] setup.sh took more than 5 seconds to quit. See tests/xmpp/setup.log
OK outgoing-message

Avinash Reddy and others added 30 commits May 21, 2021 22:50
* [Whatsapp] Add DocumentMessage handler

* Fix typo

Thanks @42wim :)

Co-authored-by: Wim <wim@42.be>

Co-authored-by: Wim <wim@42.be>
* [whatsapp] fix crash on encountering VideoMessage

* Update handlers.go

* gofmt
* nctalk: support sending file URLs

Signed-off-by: Gary Kim <gary@garykim.dev>

* nctalk: reduce nesting

Co-authored-by: Wim <wim@42.be>
Signed-off-by: Gary Kim <gary@garykim.dev>

Co-authored-by: Wim <wim@42.be>
Signed-off-by: Gary Kim <gary@garykim.dev>
* nctalk: add message deletion support

Signed-off-by: Gary Kim <gary@garykim.dev>

* nctalk: seperate out deletion and sending logic

Signed-off-by: Gary Kim <gary@garykim.dev>

* nctalk: update library to v0.2.0

Signed-off-by: Gary Kim <gary@garykim.dev>

* Rename functions to be clearer

Signed-off-by: Gary Kim <gary@garykim.dev>

* Update to go-nc-talk v0.2.1

Signed-off-by: Gary Kim <gary@garykim.dev>

* Update to go-nc-talk v0.2.2

Signed-off-by: Gary Kim <gary@garykim.dev>

* Make deletions easier to debug

Signed-off-by: Gary Kim <gary@garykim.dev>
* Release v1.22.3
Signed-off-by: Gary Kim <gary@garykim.dev>
Added Systemd section to README.md. Added Systemd to table of contents.
@selfhoster1312 selfhoster1312 force-pushed the test-xmpp branch 19 times, most recently from dcea884 to e26b6a4 Compare September 12, 2025 09:10
@selfhoster1312
Copy link
Copy Markdown
Collaborator Author

So the pipeline passed for the first time on Github (was working locally since yesterday) but there's still caveats:

  • only XMPP tests are implemented
  • even then, only outgoing-message test is implemented (bridge -> xmpp)
  • some documentation is missing in tests/README.md
  • there's currently no mechanism to orchestrate several tests in a row:
    • respect a test list in a given order: what should be the authoritative source for the list?
    • should switching tests be "automated" inside the test scripts? or should it be triggered from tests/test.sh eg. with writing to a file and sending SIGUSR1 to tests
    • currently it's hardcoded that $PROTOCOL client should be ready before API client is started, but some tests (eg. incoming-message) would be the other way around, we should check that both are ready then send a signal to trigger the test
  • what are the valid test output states we'd like to represent? probably something like OK, FAIL, SKIP (unimplemented), in which case FAIL would fail the entire job, whereas SKIP would be success-like
  • how to store/render test output for input in the protocol features matrix? Document supported features per bridge community#7

poVoq pushed a commit to poVoq/matterbridge that referenced this pull request Oct 5, 2025
…s/golang.org/x/crypto-0.31.0

Bump golang.org/x/crypto from 0.25.0 to 0.31.0
@selfhoster1312
Copy link
Copy Markdown
Collaborator Author

Closing in favor of #8

poVoq pushed a commit that referenced this pull request Apr 11, 2026
 This is a combination of 4 commits.

 This is the 1st commit message:
ah yes, change the changelog

 This is the commit message #2:
this is a good word i think

 This is the commit message #3:
run go fmt because ci error

 This is the commit message #4:
maybe?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.