mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
fix(tests): consolidate routes tests (#892)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user