}
mtime := i.ModTime()
- now := time.Now()
- if now.Sub(mtime) < time.Hour {
+ if time.Since(mtime) < time.Hour {
t.Errorf("%q was recently modified", p)
}
}
}
mtime := i.ModTime()
- now := time.Now()
- if now.Sub(mtime) > time.Hour {
+ if time.Since(mtime) > time.Hour {
t.Errorf("%q was not recently modified", p)
}
}
"status code 404")
mustNotExist(t, statePath, plainPath, groupPath)
- mustBeOld(a.t, passwdPath)
+ mustBeOld(t, passwdPath)
}
func fetchPasswdUnexpected304(a args) {
"status code 304 but did not send If-Modified-Since")
mustNotExist(t, statePath, plainPath, groupPath)
- mustBeOld(a.t, passwdPath)
+ mustBeOld(t, passwdPath)
}
func fetchPasswdEmpty(a args) {
statePath+": permission denied")
mustNotExist(t, passwdPath, plainPath, groupPath)
+ mustBeOld(t, statePath)
}
func fetchStateInvalid(a args) {