From 15455e5a7ecd9ca6ab0a74e3c0604b4c142e3458 Mon Sep 17 00:00:00 2001 From: 16yuki0702 Date: Wed, 31 Oct 2018 02:59:23 +0900 Subject: [PATCH] caddytls: Improve flaky test related to email (#2318) Signed-off-by: Hiroyuki Sasagawa --- caddytls/user_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/caddytls/user_test.go b/caddytls/user_test.go index 68d3d2aa..8cd9a84d 100644 --- a/caddytls/user_test.go +++ b/caddytls/user_test.go @@ -179,9 +179,9 @@ func TestGetEmail(t *testing.T) { // Test3: Get most recent email from before (in storage) DefaultEmail = "" for i, eml := range []string{ - "TEST4-3@foo.com", // test case insensitivity - "test4-2@foo.com", "test4-1@foo.com", + "test4-2@foo.com", + "TEST4-3@foo.com", // test case insensitivity } { u, err := newUser(eml) if err != nil { @@ -197,7 +197,7 @@ func TestGetEmail(t *testing.T) { if err != nil { t.Fatalf("Could not access user folder for '%s': %v", eml, err) } - chTime := f.ModTime().Add(-(time.Duration(i) * time.Hour)) // 1 second isn't always enough space! + chTime := f.ModTime().Add(time.Duration(i) * time.Hour) // 1 second isn't always enough space! if err := os.Chtimes(testStorage.user(eml), chTime, chTime); err != nil { t.Fatalf("Could not change user folder mod time for '%s': %v", eml, err) }