Merge pull request #132 from vbatts/no_nsec_in_test

fseval: not nanosecond for mock test
This commit is contained in:
Vincent Batts 2017-06-15 23:11:47 -05:00 committed by GitHub
commit 64ecdb40ec

View file

@ -1,6 +1,7 @@
package mtree package mtree
import ( import (
"encoding/json"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
@ -8,7 +9,7 @@ import (
"time" "time"
) )
var mockTime = time.Unix(1337888823, 88288518233) var mockTime = time.Unix(1337888823, 0)
// Here be some dodgy testing. In particular, we have to mess around with some // Here be some dodgy testing. In particular, we have to mess around with some
// of the FsEval functions. In particular, we change all of the FileInfos to a // of the FsEval functions. In particular, we change all of the FileInfos to a
@ -155,6 +156,11 @@ func TestCheckFsEval(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if len(res) > 0 { if len(res) > 0 {
buf, err := json.MarshalIndent(res, "", " ")
if err != nil {
t.Errorf("%#v", res) t.Errorf("%#v", res)
} else {
t.Errorf("%s", buf)
}
} }
} }