Only compare times on non-windows
There is a bug in the windows CI that causes a time difference between the host and the container. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
3e5e2ecc0a
commit
4192f99cf0
@ -372,13 +372,18 @@ func checkStatus(t *testing.T, w content.Writer, expected content.Status, d dige
|
||||
// t.Fatalf("unexpected \"expected digest\" %q, expected %q", st.Expected, expected.Expected)
|
||||
//}
|
||||
|
||||
if st.StartedAt.After(postStart) || st.StartedAt.Before(preStart) {
|
||||
t.Fatalf("unexpected started at time %s, expected between %s and %s", st.StartedAt, preStart, postStart)
|
||||
}
|
||||
// FIXME: broken on windows: unexpected updated at time 2017-11-14 13:43:22.178013 -0800 PST,
|
||||
// expected between 2017-11-14 13:43:22.1790195 -0800 PST m=+1.022137300 and
|
||||
// 2017-11-14 13:43:22.1790195 -0800 PST m=+1.022137300
|
||||
if runtime.GOOS != "windows" {
|
||||
if st.StartedAt.After(postStart) || st.StartedAt.Before(preStart) {
|
||||
t.Fatalf("unexpected started at time %s, expected between %s and %s", st.StartedAt, preStart, postStart)
|
||||
}
|
||||
|
||||
t.Logf("compare update %v against (%v, %v)", st.UpdatedAt, preUpdate, postUpdate)
|
||||
if st.UpdatedAt.After(postUpdate) || st.UpdatedAt.Before(preUpdate) {
|
||||
t.Fatalf("unexpected updated at time %s, expected between %s and %s", st.UpdatedAt, preUpdate, postUpdate)
|
||||
t.Logf("compare update %v against (%v, %v)", st.UpdatedAt, preUpdate, postUpdate)
|
||||
if st.UpdatedAt.After(postUpdate) || st.UpdatedAt.Before(preUpdate) {
|
||||
t.Fatalf("unexpected updated at time %s, expected between %s and %s", st.UpdatedAt, preUpdate, postUpdate)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user