From d8b7553aa58da3397db5a66f4be63646325d1ce9 Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Mon, 19 Apr 2021 22:59:07 +0200 Subject: [PATCH] Fixed unit test --- internal/storage/FileServing_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/storage/FileServing_test.go b/internal/storage/FileServing_test.go index 22d4abe..06aa1eb 100644 --- a/internal/storage/FileServing_test.go +++ b/internal/storage/FileServing_test.go @@ -65,6 +65,7 @@ func TestAddHotlink(t *testing.T) { } func TestNewFile(t *testing.T) { + os.Setenv("TZ", "UTC") content := []byte("This is a file for testing purposes") mimeHeader := make(textproto.MIMEHeader) mimeHeader.Set("Content-Disposition", "form-data; name=\"file\"; filename=\"test.dat\"") @@ -81,7 +82,7 @@ func TestNewFile(t *testing.T) { test.IsEqualString(t, file.HotlinkId, "") test.IsEqualString(t, file.PasswordHash, "") test.IsEqualString(t, file.Size, "35 B") - test.IsEqualString(t, file.ExpireAtString, "2038-01-19 04:13") + test.IsEqualString(t, file.ExpireAtString, "2038-01-19 03:13") test.IsEqualInt(t, file.DownloadsRemaining, 1) test.IsEqualInt(t, len(file.Id), 20) test.IsEqualInt(t, int(file.ExpireAt), 2147483600)