+func fetchPasswdUnexpected304(a args) {
+ t := a.t
+ mustWritePasswdConfig(t, a.url)
+ mustCreate(t, passwdPath)
+
+ *a.handler = func(w http.ResponseWriter, r *http.Request) {
+ // 304
+ w.WriteHeader(http.StatusNotModified)
+ }
+
+ err := mainFetch(configPath)
+ mustBeErrorWithSubstring(t, err,
+ "status code 304 but did not send If-Modified-Since")
+
+ mustNotExist(t, statePath, plainPath, groupPath)
+ mustBeOld(a.t, passwdPath)
+}
+