From 8be970af953940a0a39f60b8558552749b50b827 Mon Sep 17 00:00:00 2001 From: Kegan Dougal <7190048+kegsay@users.noreply.github.com> Date: Fri, 27 Sep 2024 09:37:28 +0100 Subject: [PATCH 1/2] Capture logs/dumps from sub packages --- .github/workflows/single_sdk_tests.yml | 4 ++-- .github/workflows/tests.yaml | 4 ++-- tests/membership_acls_test.go | 1 + tests/rust/notification_test.go | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/single_sdk_tests.yml b/.github/workflows/single_sdk_tests.yml index 78f6e0f..0a982ff 100644 --- a/.github/workflows/single_sdk_tests.yml +++ b/.github/workflows/single_sdk_tests.yml @@ -191,6 +191,6 @@ jobs: with: name: Logs - ${{ inputs.use_js_sdk != '' && 'jssdk' || 'rust'}} path: | - ./complement-crypto/tests/logs/* - ./complement-crypto/tests/mitm.dump + ./complement-crypto/**/logs/* + ./complement-crypto/**/mitm.dump diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5dec2a3..16711ff 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -163,5 +163,5 @@ jobs: with: name: Logs - ${{ job.status }} path: | - ./tests/logs/* - ./complement-crypto/tests/mitm.dump + ./complement-crypto/**/logs/* + ./complement-crypto/**/mitm.dump diff --git a/tests/membership_acls_test.go b/tests/membership_acls_test.go index 42a1cb9..f25fb15 100644 --- a/tests/membership_acls_test.go +++ b/tests/membership_acls_test.go @@ -53,6 +53,7 @@ func TestAliceBobEncryptionWorks(t *testing.T) { // Bob receives the message t.Logf("bob (%s) waiting for event %s", bob.Type(), evID) waiter.Waitf(t, 5*time.Second, "bob did not see alice's message") + t.Errorf("oh no") }) }) } diff --git a/tests/rust/notification_test.go b/tests/rust/notification_test.go index 0b78db7..dd2d1da 100644 --- a/tests/rust/notification_test.go +++ b/tests/rust/notification_test.go @@ -98,6 +98,7 @@ func testNSEReceive(t *testing.T, numMsgsBefore, numMsgsAfter int) { // what happens if you receive an NSE event for a non-pre key message (i.e not the first encrypted msg sent by that user) func TestNSEReceiveForNonPreKeyMessage(t *testing.T) { + t.Errorf("oh dear") tc, roomID := createAndJoinRoom(t) // Alice starts syncing alice := tc.MustLoginClient(t, &cc.ClientCreationRequest{ From a3c396f3d51b8ba04a3a474a95b1a92734734660 Mon Sep 17 00:00:00 2001 From: Kegan Dougal <7190048+kegsay@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:16:00 +0100 Subject: [PATCH 2/2] Fix glob path for combined tests --- .github/workflows/tests.yaml | 4 ++-- tests/membership_acls_test.go | 1 - tests/rust/notification_test.go | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 16711ff..f17fbb6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -163,5 +163,5 @@ jobs: with: name: Logs - ${{ job.status }} path: | - ./complement-crypto/**/logs/* - ./complement-crypto/**/mitm.dump + ./**/logs/* + ./**/mitm.dump diff --git a/tests/membership_acls_test.go b/tests/membership_acls_test.go index f25fb15..42a1cb9 100644 --- a/tests/membership_acls_test.go +++ b/tests/membership_acls_test.go @@ -53,7 +53,6 @@ func TestAliceBobEncryptionWorks(t *testing.T) { // Bob receives the message t.Logf("bob (%s) waiting for event %s", bob.Type(), evID) waiter.Waitf(t, 5*time.Second, "bob did not see alice's message") - t.Errorf("oh no") }) }) } diff --git a/tests/rust/notification_test.go b/tests/rust/notification_test.go index dd2d1da..0b78db7 100644 --- a/tests/rust/notification_test.go +++ b/tests/rust/notification_test.go @@ -98,7 +98,6 @@ func testNSEReceive(t *testing.T, numMsgsBefore, numMsgsAfter int) { // what happens if you receive an NSE event for a non-pre key message (i.e not the first encrypted msg sent by that user) func TestNSEReceiveForNonPreKeyMessage(t *testing.T) { - t.Errorf("oh dear") tc, roomID := createAndJoinRoom(t) // Alice starts syncing alice := tc.MustLoginClient(t, &cc.ClientCreationRequest{