diff --git a/.github/workflows/oci-conformance-action.yml b/.github/workflows/oci-conformance-action.yml index 021dc6ef..ff0a9e39 100644 --- a/.github/workflows/oci-conformance-action.yml +++ b/.github/workflows/oci-conformance-action.yml @@ -38,8 +38,8 @@ jobs: with: # TODO: change to upstream once the foloowing PR is merged: # https://github.com/opencontainers/distribution-spec/pull/436 - repository: opencontainers/distribution-spec - ref: main + repository: rchincha/distribution-spec + ref: fix-ref path: distribution-spec - name: build conformance binary from main run: | diff --git a/pkg/api/controller_test.go b/pkg/api/controller_test.go index 038a241b..d9c0d301 100644 --- a/pkg/api/controller_test.go +++ b/pkg/api/controller_test.go @@ -5924,7 +5924,7 @@ func TestArtifactReferences(t *testing.T) { So(err, ShouldBeNil) So(resp.StatusCode(), ShouldEqual, http.StatusOK) So(resp.Header().Get("Content-Type"), ShouldEqual, ispec.MediaTypeImageIndex) - So(resp.Header().Get("OCI-Filters-Applied"), ShouldEqual, artifactType) + So(resp.Header().Get("OCI-Filters-Applied"), ShouldEqual, "artifactType") resp, err = resty.R().SetQueryParams(map[string]string{"artifactType": artifactType + ",otherArtType"}).Get(baseURL + fmt.Sprintf("/v2/%s/referrers/%s", repoName, @@ -5932,7 +5932,7 @@ func TestArtifactReferences(t *testing.T) { So(err, ShouldBeNil) So(resp.StatusCode(), ShouldEqual, http.StatusOK) So(resp.Header().Get("Content-Type"), ShouldEqual, ispec.MediaTypeImageIndex) - So(resp.Header().Get("OCI-Filters-Applied"), ShouldEqual, artifactType+",otherArtType") + So(resp.Header().Get("OCI-Filters-Applied"), ShouldEqual, "artifactType") }) }) }) diff --git a/pkg/api/routes.go b/pkg/api/routes.go index e01e0194..3c809a77 100644 --- a/pkg/api/routes.go +++ b/pkg/api/routes.go @@ -624,7 +624,8 @@ func (rh *RouteHandler) GetReferrers(response http.ResponseWriter, request *http } if len(artifactTypes) > 0 { - response.Header().Set("OCI-Filters-Applied", strings.Join(artifactTypes, ",")) + // currently, the only filter supported and on this end-point + response.Header().Set("OCI-Filters-Applied", "artifactType") } zcommon.WriteData(response, http.StatusOK, ispec.MediaTypeImageIndex, out)