daemon: integrate QoL slices 1-5 (model/rename/catalog, history deletes, stats, repo prepare+imageUsed+built) — 95.3% cover green
This commit is contained in:
@@ -66,6 +66,7 @@ type fakeDocker struct {
|
||||
failWait bool
|
||||
failVolumeCreate bool
|
||||
failVolumeDelete bool
|
||||
failImages bool
|
||||
failVolumeInspect bool
|
||||
failArchive bool
|
||||
archiveHang bool
|
||||
@@ -229,6 +230,11 @@ func (f *fakeDocker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Api-Version", "1.44")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
case call.Method == http.MethodGet && call.Path == "/images/json":
|
||||
|
||||
if f.failImages {
|
||||
writeJSONNow(w, http.StatusInternalServerError, `{"message":"images endpoint broken"}`)
|
||||
return
|
||||
}
|
||||
writeJSONNow(w, http.StatusOK, "["+f.imageListJSON(r.URL.Query().Get("filters"))+"]")
|
||||
case call.Method == http.MethodPost && call.Path == "/build":
|
||||
if f.failBuildHTTP {
|
||||
|
||||
Reference in New Issue
Block a user