matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
465 stars 150 forks source link

Make spec reporting consistent with matrix-appservice-bridge #1680

Open progval opened 1 year ago

progval commented 1 year ago

The ad-hoc logging printed every test's name, even when skipped by --filter, causing the output to be longer than it should

progval commented 1 year ago

Signed-off-by: Valentin Lorentz \<progval plus matrixsignoff at progval dot net>

progval commented 1 year ago

Any idea what is causing this?

TEST: Test listening for irc.example_M-flibble to call function 'connect'
TEST: Test listening for irc.example_bob to call function 'connect'
TEST: Test listening for irc.example_ro_bot_nick to call function 'connect'
TEST: Test listening for irc.example_M-flibble to call function 'join'
TEST: Test listening for irc.example_bob to call function 'join'
TEST: Test listening for irc.example_ro_bot_nick to call function 'join'
TEST: Test listening for irc.example_ro_bot_nick to call function 'join'
TEST: Test listening for irc.example_M-flibble to call function 'join'
TEST: Test listening for irc.example_ro_bot_nick to call function 'names'
TEST: Test listening for irc.example_ro_bot_nick to call function 'part'
DEBUG 20:40:44:295 [LogWrapper] Reconfigured logging
2023-03-11 20:40:44 INFO:IrcBridge Sending ephemeral events to the bridge is currently disabled in the registration file, so user activity will not be captured
2023-03-11 20:40:44 ERROR:BridgedClient <ro_bot_nick@irc.example#9p3gflka8qo00> sendMessage: Failed to join channel oprah
2023-03-11 20:40:44 INFO:IrcBridge Using NeDBDataStore for Datastore
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'id' for store.
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'matrix_id' for store.
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'remote_id' for store.
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'localpart' for store.
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'user id' for store.
2023-03-11 20:40:44 INFO:CryptoStore Private key loaded from ./spec/support/passkey.pem - IRC password encryption enabled.
2023-03-11 20:40:44 INFO:IrcBridge Restoring last active times from DB
2023-03-11 20:40:44 INFO:IrcBridge Restored 0 last active times from DB
2023-03-11 20:40:44 INFO:IrcServer Reconfiguring irc.example
2023-03-11 20:40:44 INFO:NeDBDataStore storeRoom (id=!foo:bar, addr=irc.example, chan=#coffee, origin=config)
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked for ident username for irc.example on users database
2023-03-11 20:40:44 INFO:IrcBridge Listening on 0.0.0.0:2
2023-03-11 20:40:44 INFO:IrcBridge Fetching Matrix rooms that are already joined to...
2023-03-11 20:40:44 INFO:IrcBridge ASBot is in 0 rooms!
2023-03-11 20:40:44 INFO:IrcBridge Joining mapped Matrix rooms...
2023-03-11 20:40:44 INFO:IrcBridge Syncing relevant membership lists...
2023-03-11 20:40:44 INFO:MemberListSyncer irc.example does not have membership list syncing enabled.
2023-03-11 20:40:44 INFO:IrcBridge Starting provisioning API...
2023-03-11 20:40:44 WARN:Provisioner Provisioner is incompatible with NeDB store. Widget requests will not be handled.
2023-03-11 20:40:44 INFO:Provisioner Provisioning API ready
2023-03-11 20:40:44 INFO:IrcBridge Connecting to IRC networks...
2023-03-11 20:40:44 INFO:BridgedClient <ro_bot_nick@irc.example#av6nhay72m800> Created client for bot
2023-03-11 20:40:44 DEBUG:ClientPool 1 active connections on irc.example
2023-03-11 20:40:44 DEBUG:ClientPool Created new bot client for irc.example : av6nhay72m800 (bot enabled=true)
2023-03-11 20:40:44 INFO:ClientPool Bot connecting to irc.example (1 channels) => ["#coffee"]
2023-03-11 20:40:44 DEBUG:BridgedClient <ro_bot_nick@irc.example#av6nhay72m800> Client is now CONNECTING
2023-03-11 20:40:44 INFO:BridgedClient <ro_bot_nick@irc.example#av6nhay72m800> Connecting to IRC server irc.example as ro_bot_nick (user=matrixbot)
TEST: Bridge called IRC client.connect(["irc.example_ro_bot_nick","connect",{"a)
TEST: Invoking test callback for user irc.example_ro_bot_nick : client.connect([{"addr":"irc.example","nick":"ro_bot_ni)
2023-03-11 20:40:44 INFO:BridgedClient <ro_bot_nick@irc.example#av6nhay72m800> Client is now CONNECTED
2023-03-11 20:40:44 INFO:IrcBridge Startup complete.
2023-03-11 20:40:44 INFO:main Killing bridge: test teardown
2023-03-11 20:40:44 INFO:IrcBridge Killing bridge
2023-03-11 20:40:44 INFO:IrcBridge Killing all clients
2023-03-11 20:40:44 INFO:BridgedClient Killing client 
2023-03-11 20:40:44 DEBUG:BridgedClient Client is now KILLED
2023-03-11 20:40:44 INFO:client-connection disconnect()ing ro_bot_nick@irc.example - killed
TEST: Bridge called IRC client.disconnect(["irc.example_ro_bot_nick","disconnect",)
2023-03-11 20:40:44 WARN:ClientPool Client av6nhay72m800 (null) disconnected with reason killed
2023-03-11 20:40:44 INFO:ClientPool Dropping av6nhay72m800 (ro_bot_nick) because explicitDisconnect is true
2023-03-11 20:40:44 INFO:BridgedClient Killing client 
2023-03-11 20:40:44 DEBUG:BridgedClient Client is now KILLED
2023-03-11 20:40:44 INFO:IrcBridge Closing bridge
        ✗ should create a M<--->I link for a channel that has capital letters in it
          - Unhandled promise rejection: Error: No client

it seems sensitive to test order, but I can't figure what is causing it