summaryrefslogtreecommitdiff
path: root/internal/federation/federator_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-16 11:35:09 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-16 11:35:09 +0200
commit92186c8c6f1c374146f085b46a440b69a1d97aa8 (patch)
tree06d7aea58ee399c4939ffa9052bcc548427cbfa4 /internal/federation/federator_test.go
parentFix mentions not notifying (#230) (diff)
downloadgotosocial-92186c8c6f1c374146f085b46a440b69a1d97aa8.tar.xz
federated authentication better logging + tidying (#232)
* change trace logging in authenticator * messing about * lil changes * go fmt * error fix * Fix broken test
Diffstat (limited to 'internal/federation/federator_test.go')
-rw-r--r--internal/federation/federator_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/federation/federator_test.go b/internal/federation/federator_test.go
index 7a76089d7..5a7056e6b 100644
--- a/internal/federation/federator_test.go
+++ b/internal/federation/federator_test.go
@@ -128,12 +128,13 @@ func (suite *ProtocolTestSuite) TestAuthenticatePostInbox() {
ctxWithAccount := context.WithValue(ctx, util.APAccount, inboxAccount)
ctxWithActivity := context.WithValue(ctxWithAccount, util.APActivity, activity)
ctxWithVerifier := context.WithValue(ctxWithActivity, util.APRequestingPublicKeyVerifier, verifier)
+ ctxWithSignature := context.WithValue(ctxWithVerifier, util.APRequestingPublicKeySignature, activity.SignatureHeader)
// we can pass this recorder as a writer and read it back after
recorder := httptest.NewRecorder()
// trigger the function being tested, and return the new context it creates
- newContext, authed, err := federator.AuthenticatePostInbox(ctxWithVerifier, recorder, request)
+ newContext, authed, err := federator.AuthenticatePostInbox(ctxWithSignature, recorder, request)
assert.NoError(suite.T(), err)
assert.True(suite.T(), authed)