Skip to content

Commit

Permalink
Fix: BCR Path to list repo and create repo (#172)
Browse files Browse the repository at this point in the history
* Fix: BCR Path to list repo and create repo

* Fix: Test with new path
  • Loading branch information
greatbn authored Dec 27, 2023
1 parent 80f5f50 commit 66fd54b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion container_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ type TokenResp struct {
}

func (c *containerRegistry) resourcePath() string {
return registryPath
return registryPath + "/"
}

func (c *containerRegistry) itemPath(id string) string {
Expand Down
4 changes: 2 additions & 2 deletions container_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestReposList(t *testing.T) {
setup()
defer teardown()

mux.HandleFunc(testlib.RegistryURL(registryPath), func(writer http.ResponseWriter, r *http.Request) {
mux.HandleFunc(testlib.RegistryURL(registryPath + "/"), func(writer http.ResponseWriter, r *http.Request) {
require.Equal(t, http.MethodGet, r.Method)
resp := `
{
Expand All @@ -45,7 +45,7 @@ func TestRepoCreate(t *testing.T) {
setup()
defer teardown()

mux.HandleFunc(testlib.RegistryURL(registryPath), func(writer http.ResponseWriter, r *http.Request) {
mux.HandleFunc(testlib.RegistryURL(registryPath + "/"), func(writer http.ResponseWriter, r *http.Request) {
require.Equal(t, http.MethodPost, r.Method)
var payload *CreateRepositoryPayload
require.NoError(t, json.NewDecoder(r.Body).Decode(&payload))
Expand Down

0 comments on commit 66fd54b

Please sign in to comment.