Skip to content

Commit

Permalink
mock OCI server routes corrected, e.g. '/v2/:name/manifests/:ref' cor…
Browse files Browse the repository at this point in the history
…rected to '/v2/devfile-catalog/:name/manifests/:ref'

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
  • Loading branch information
michael-valdron committed Jul 29, 2022
1 parent db8cb4e commit e11d9fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index/server/pkg/server/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ func getBlob(w http.ResponseWriter, r *http.Request) {

func setupMockOCIServer() (func(), error) {
router := http.NewServeMux()
router.Handle("/v2/:name/manifests/:ref", validateMethod(getManifest, http.MethodGet, http.MethodHead))
router.Handle("/v2/:name/blob/:digest", validateMethod(getBlob, http.MethodGet, http.MethodHead))
router.Handle("/v2/devfile-catalog/:name/manifests/:ref", validateMethod(getManifest, http.MethodGet, http.MethodHead))
router.Handle("/v2/devfile-catalog/:name/blob/:digest", validateMethod(getBlob, http.MethodGet, http.MethodHead))
testOCIServer := httptest.NewUnstartedServer(router)

l, err := net.Listen("tcp", ociServerIP)
Expand Down

0 comments on commit e11d9fb

Please sign in to comment.