mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-06 22:40:31 -05:00
caddytls: Improve flaky test related to email (#2318)
Signed-off-by: Hiroyuki Sasagawa <hs19870702@gmail.com>
This commit is contained in:
parent
f46da403d8
commit
15455e5a7e
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue