lsf: make sure we use localtime in tests - fixes Box integration tests
This problem was introduced with eca99b33c0
. It seems Box is the only
remote which converts time zones, so if you give it a GMT time zone,
it returns a PST time zone which represents the same instant.
This commit is contained in:
parent
06e3fa3aba
commit
cbec59146a
1 changed files with 3 additions and 3 deletions
|
@ -875,7 +875,7 @@ func TestListFormat(t *testing.T) {
|
|||
|
||||
list.SetOutput(nil)
|
||||
list.AddModTime()
|
||||
assert.Equal(t, items[0].ModTime().Format("2006-01-02 15:04:05"), operations.ListFormatted(&items[0], &list))
|
||||
assert.Equal(t, items[0].ModTime().Local().Format("2006-01-02 15:04:05"), operations.ListFormatted(&items[0], &list))
|
||||
|
||||
list.SetOutput(nil)
|
||||
list.AddSize()
|
||||
|
@ -885,8 +885,8 @@ func TestListFormat(t *testing.T) {
|
|||
list.AddModTime()
|
||||
list.SetDirSlash(true)
|
||||
list.SetSeparator("__SEP__")
|
||||
assert.Equal(t, "1__SEP__a__SEP__"+items[0].ModTime().Format("2006-01-02 15:04:05"), operations.ListFormatted(&items[0], &list))
|
||||
assert.Equal(t, fmt.Sprintf("%d", items[1].Size())+"__SEP__subdir/__SEP__"+items[1].ModTime().Format("2006-01-02 15:04:05"), operations.ListFormatted(&items[1], &list))
|
||||
assert.Equal(t, "1__SEP__a__SEP__"+items[0].ModTime().Local().Format("2006-01-02 15:04:05"), operations.ListFormatted(&items[0], &list))
|
||||
assert.Equal(t, fmt.Sprintf("%d", items[1].Size())+"__SEP__subdir/__SEP__"+items[1].ModTime().Local().Format("2006-01-02 15:04:05"), operations.ListFormatted(&items[1], &list))
|
||||
|
||||
for _, test := range []struct {
|
||||
ht hash.Type
|
||||
|
|
Loading…
Reference in a new issue