From 207e990798c40641852fce9c143becbe40103bbf Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Sun, 13 Mar 2022 21:30:14 -0400 Subject: [PATCH] Fix brittle test --- server/server_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server_test.go b/server/server_test.go index 6c3a36a8..c30368a1 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -870,7 +870,7 @@ func TestServer_PublishAttachment(t *testing.T) { require.Equal(t, "attachment.txt", msg.Attachment.Name) require.Equal(t, "text/plain; charset=utf-8", msg.Attachment.Type) require.Equal(t, int64(5000), msg.Attachment.Size) - require.GreaterOrEqual(t, msg.Attachment.Expires, time.Now().Add(3*time.Hour).Unix()) + require.GreaterOrEqual(t, msg.Attachment.Expires, time.Now().Add(179*time.Minute).Unix()) // Almost 3 hours require.Contains(t, msg.Attachment.URL, "http://127.0.0.1:12345/file/") require.Equal(t, "", msg.Attachment.Owner) // Should never be returned require.FileExists(t, filepath.Join(s.config.AttachmentCacheDir, msg.ID))