fix(tests): consolidate routes tests (#892)

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
peusebiu
2022-10-19 19:26:46 +03:00
committed by GitHub
parent d93c68af33
commit 76714d53f8
2 changed files with 24 additions and 0 deletions
+9
View File
@@ -796,6 +796,9 @@ func TestRoutes(t *testing.T) {
PutBlobChunkFn: func(repo, uuid string, from, to int64, body io.Reader) (int64, error) {
return 100, ErrUnexpectedError
},
DeleteBlobUploadFn: func(repo, uuid string) error {
return ErrUnexpectedError
},
},
)
So(status, ShouldEqual, http.StatusInternalServerError)
@@ -941,6 +944,9 @@ func TestRoutes(t *testing.T) {
PutBlobChunkFn: func(repo, uuid string, from, to int64, body io.Reader) (int64, error) {
return 0, ErrUnexpectedError
},
DeleteBlobUploadFn: func(repo, uuid string) error {
return ErrUnexpectedError
},
},
)
So(status, ShouldEqual, http.StatusInternalServerError)
@@ -1041,6 +1047,9 @@ func TestRoutes(t *testing.T) {
FinishBlobUploadFn: func(repo, uuid string, body io.Reader, digest string) error {
return ErrUnexpectedError
},
DeleteBlobUploadFn: func(repo, uuid string) error {
return ErrUnexpectedError
},
},
)
So(status, ShouldEqual, http.StatusInternalServerError)