mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #12681 from hqhq/hq_fix_test_in_apiserver
fix test case name
This commit is contained in:
commit
71ac5b7903
1 changed files with 3 additions and 2 deletions
|
@ -13,19 +13,20 @@ import (
|
|||
"github.com/docker/docker/pkg/version"
|
||||
)
|
||||
|
||||
func TesthttpError(t *testing.T) {
|
||||
func TestHttpError(t *testing.T) {
|
||||
r := httptest.NewRecorder()
|
||||
|
||||
httpError(r, fmt.Errorf("No such method"))
|
||||
if r.Code != http.StatusNotFound {
|
||||
t.Fatalf("Expected %d, got %d", http.StatusNotFound, r.Code)
|
||||
}
|
||||
|
||||
r = httptest.NewRecorder()
|
||||
httpError(r, fmt.Errorf("This accound hasn't been activated"))
|
||||
if r.Code != http.StatusForbidden {
|
||||
t.Fatalf("Expected %d, got %d", http.StatusForbidden, r.Code)
|
||||
}
|
||||
|
||||
r = httptest.NewRecorder()
|
||||
httpError(r, fmt.Errorf("Some error"))
|
||||
if r.Code != http.StatusInternalServerError {
|
||||
t.Fatalf("Expected %d, got %d", http.StatusInternalServerError, r.Code)
|
||||
|
|
Loading…
Add table
Reference in a new issue