Add an "enabled" parameter under "readonly", and make it as if the mutable handlers don't exist when read-only mode is enabled
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
df9758ba39
commit
cbf83ecd31
7 changed files with 40 additions and 45 deletions
|
@ -658,7 +658,7 @@ func TestDeleteReadOnly(t *testing.T) {
|
|||
t.Fatalf("unexpected error deleting layer: %v", err)
|
||||
}
|
||||
|
||||
checkResponse(t, "deleting layer in read-only mode", resp, http.StatusServiceUnavailable)
|
||||
checkResponse(t, "deleting layer in read-only mode", resp, http.StatusMethodNotAllowed)
|
||||
}
|
||||
|
||||
func TestStartPushReadOnly(t *testing.T) {
|
||||
|
@ -678,7 +678,7 @@ func TestStartPushReadOnly(t *testing.T) {
|
|||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
checkResponse(t, "starting push in read-only mode", resp, http.StatusServiceUnavailable)
|
||||
checkResponse(t, "starting push in read-only mode", resp, http.StatusMethodNotAllowed)
|
||||
}
|
||||
|
||||
func httpDelete(url string) (*http.Response, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue