summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-06-21 20:08:48 +0100
committerLibravatar GitHub <noreply@github.com>2023-06-21 21:08:48 +0200
commit8e0043104d3792c33850f948f1b080acd44eda90 (patch)
tree2bf7dca025024b6a6189a8634c33ec697346c4ae /internal
parent[feature] Add partial text search for accounts + statuses (#1836) (diff)
downloadgotosocial-8e0043104d3792c33850f948f1b080acd44eda90.tar.xz
[performance] update go-cache library (#1917)
* update go-cache library Signed-off-by: kim <grufwub@gmail.com> * fix broken test after cache library upgrade Signed-off-by: kim <grufwub@gmail.com> * fix the webfinger test Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/transport/finger_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/transport/finger_test.go b/internal/transport/finger_test.go
index bd1e8b24d..e6814ac84 100644
--- a/internal/transport/finger_test.go
+++ b/internal/transport/finger_test.go
@@ -87,11 +87,9 @@ func (suite *FingerTestSuite) TestFingerWithHostMetaCacheStrategy() {
// the TTL of the entry should have extended because we did a second
// successful finger
- if repeatTime.Equal(initialTime) {
+ if repeatTime == initialTime {
suite.FailNowf("expected webfinger cache entry to have different expiry times", "initial: '%s', repeat: '%s'", initialTime, repeatTime)
- }
-
- if repeatTime.Before(initialTime) {
+ } else if repeatTime < initialTime {
suite.FailNowf("expected webfinger cache entry to not be a time traveller", "initial: '%s', repeat: '%s'", initialTime, repeatTime)
}