diff options
Diffstat (limited to 'internal/transport')
-rw-r--r-- | internal/transport/finger.go | 8 | ||||
-rw-r--r-- | internal/transport/finger_test.go | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/internal/transport/finger.go b/internal/transport/finger.go index 12563874c..f550769af 100644 --- a/internal/transport/finger.go +++ b/internal/transport/finger.go @@ -36,7 +36,7 @@ import ( func (t *transport) webfingerURLFor(targetDomain string) (string, bool) { url := "https://" + targetDomain + "/.well-known/webfinger" - wc := t.controller.state.Caches.GTS.Webfinger + wc := t.controller.state.Caches.Webfinger // We're doing the manual locking/unlocking here to be able to // safely call Cache.Get instead of Get, as the latter updates the @@ -95,7 +95,7 @@ func (t *transport) Finger(ctx context.Context, targetUsername string, targetDom // If we got a response we consider successful on a cached URL, i.e one set // by us later on when a host-meta based webfinger request succeeded, set it // again here to renew the TTL - t.controller.state.Caches.GTS.Webfinger.Set(targetDomain, url) + t.controller.state.Caches.Webfinger.Set(targetDomain, url) } if rsp.StatusCode == http.StatusGone { @@ -159,7 +159,7 @@ func (t *transport) Finger(ctx context.Context, targetUsername string, targetDom // we asked for is gone. This means the endpoint itself is valid and we should // cache it for future queries to the same domain if rsp.StatusCode == http.StatusGone { - t.controller.state.Caches.GTS.Webfinger.Set(targetDomain, host) + t.controller.state.Caches.Webfinger.Set(targetDomain, host) return nil, fmt.Errorf("account has been deleted/is gone") } // We've reached the end of the line here, both the original request @@ -170,7 +170,7 @@ func (t *transport) Finger(ctx context.Context, targetUsername string, targetDom // Set the URL in cache here, since host-meta told us this should be the // valid one, it's different from the default and our request to it did // not fail in any manner - t.controller.state.Caches.GTS.Webfinger.Set(targetDomain, host) + t.controller.state.Caches.Webfinger.Set(targetDomain, host) return io.ReadAll(rsp.Body) } diff --git a/internal/transport/finger_test.go b/internal/transport/finger_test.go index 380a4aff9..db2369799 100644 --- a/internal/transport/finger_test.go +++ b/internal/transport/finger_test.go @@ -31,7 +31,7 @@ type FingerTestSuite struct { } func (suite *FingerTestSuite) TestFinger() { - wc := suite.state.Caches.GTS.Webfinger + wc := suite.state.Caches.Webfinger suite.Equal(0, wc.Len(), "expect webfinger cache to be empty") _, err := suite.transport.Finger(context.TODO(), "brand_new_person", "unknown-instance.com") @@ -43,7 +43,7 @@ func (suite *FingerTestSuite) TestFinger() { } func (suite *FingerTestSuite) TestFingerWithHostMeta() { - wc := suite.state.Caches.GTS.Webfinger + wc := suite.state.Caches.Webfinger suite.Equal(0, wc.Len(), "expect webfinger cache to be empty") _, err := suite.transport.Finger(context.TODO(), "someone", "misconfigured-instance.com") @@ -60,7 +60,7 @@ func (suite *FingerTestSuite) TestFingerWithHostMetaCacheStrategy() { suite.T().Skip("this test is flaky on CI for as of yet unknown reasons") } - wc := suite.state.Caches.GTS.Webfinger + wc := suite.state.Caches.Webfinger // Reset the sweep frequency so nothing interferes with the test wc.Stop() |