Skip to content

Commit 462145a

Browse files
authored
Merge pull request opencontainers#3 from jdolitsky/remove-conformance
Temporarily remove conformance changes
2 parents b6f40f8 + b1f849f commit 462145a

File tree

3 files changed

+13
-54
lines changed

3 files changed

+13
-54
lines changed

conformance/03_discovery_test.go

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,37 @@ var test03ContentDiscovery = func() {
1919
var tagList []string
2020

2121
g.Context("Setup", func() {
22-
g.Specify("Populate registry with test blobs", func() {
23-
SkipIfDisabled(contentDiscovery)
24-
RunOnlyIf(runContentDiscoverySetup)
25-
for i := 1; i <= 2; i++ {
26-
req := client.NewRequest(reggie.POST, "/v2/<name>/blobs/uploads/")
27-
resp, err := client.Do(req)
28-
Expect(err).To(BeNil())
29-
req = client.NewRequest(reggie.PUT, resp.GetRelativeLocation()).
30-
SetQueryParam("digest", configs[i].Digest).
31-
SetHeader("Content-Type", "application/octet-stream").
32-
SetHeader("Content-Length", configs[i].ContentLength).
33-
SetBody(configs[i].Content)
34-
resp, err = client.Do(req)
35-
Expect(err).To(BeNil())
36-
Expect(resp.StatusCode()).To(SatisfyAll(
37-
BeNumerically(">=", 200),
38-
BeNumerically("<", 300)))
39-
}
40-
})
41-
42-
g.Specify("Populate registry with test layer", func() {
22+
g.Specify("Populate registry with test blob", func() {
4323
SkipIfDisabled(contentDiscovery)
4424
RunOnlyIf(runContentDiscoverySetup)
4525
req := client.NewRequest(reggie.POST, "/v2/<name>/blobs/uploads/")
4626
resp, err := client.Do(req)
4727
Expect(err).To(BeNil())
4828
req = client.NewRequest(reggie.PUT, resp.GetRelativeLocation()).
49-
SetQueryParam("digest", layerBlobDigest).
29+
SetQueryParam("digest", configs[2].Digest).
5030
SetHeader("Content-Type", "application/octet-stream").
51-
SetHeader("Content-Length", layerBlobContentLength).
52-
SetBody(layerBlobData)
31+
SetHeader("Content-Length", configs[2].ContentLength).
32+
SetBody(configs[2].Content)
5333
resp, err = client.Do(req)
5434
Expect(err).To(BeNil())
5535
Expect(resp.StatusCode()).To(SatisfyAll(
5636
BeNumerically(">=", 200),
5737
BeNumerically("<", 300)))
5838
})
5939

60-
g.Specify("Populate registry with referred-to manifest", func() {
40+
g.Specify("Populate registry with test layer", func() {
6141
SkipIfDisabled(contentDiscovery)
6242
RunOnlyIf(runContentDiscoverySetup)
63-
req := client.NewRequest(reggie.PUT, "/v2/<name>/manifests/<reference>",
64-
reggie.WithReference("test-something-points-to-me")).
65-
SetHeader("Content-Type", "application/vnd.oci.image.manifest.v1+json").
66-
SetBody(manifests[1].Content)
43+
req := client.NewRequest(reggie.POST, "/v2/<name>/blobs/uploads/")
6744
resp, err := client.Do(req)
6845
Expect(err).To(BeNil())
46+
req = client.NewRequest(reggie.PUT, resp.GetRelativeLocation()).
47+
SetQueryParam("digest", layerBlobDigest).
48+
SetHeader("Content-Type", "application/octet-stream").
49+
SetHeader("Content-Length", layerBlobContentLength).
50+
SetBody(layerBlobData)
51+
resp, err = client.Do(req)
52+
Expect(err).To(BeNil())
6953
Expect(resp.StatusCode()).To(SatisfyAll(
7054
BeNumerically(">=", 200),
7155
BeNumerically("<", 300)))
@@ -141,19 +125,6 @@ var test03ContentDiscovery = func() {
141125
Expect(len(tagList)).To(BeNumerically("<=", numResults))
142126
Expect(tagList).To(ContainElement(tagList[numResults-1]))
143127
})
144-
145-
g.Specify("GET request to list of referrers should yield 200 response", func() {
146-
SkipIfDisabled(contentDiscovery)
147-
// TODO: should move to this form per the spec,
148-
// the endpoint used is supported currently by oci-playground/distribution
149-
// req := client.NewRequest(reggie.GET, "/v2/<name>/referrers/<digest>", reggie.WithDigest(manifests[2].Digest))
150-
req := client.NewRequest(reggie.GET, "/v2/<name>/_oci/artifacts/referrers")
151-
// set the digest to the one being pointed to by manifests[2]
152-
req.QueryParam.Add("digest", manifests[1].Digest)
153-
resp, err := client.Do(req)
154-
Expect(err).To(BeNil())
155-
Expect(resp.StatusCode()).To(Equal(http.StatusOK))
156-
})
157128
})
158129

159130
g.Context("Teardown", func() {

conformance/image.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ type Manifest struct {
2020

2121
// Layers is an indexed list of layers referenced by the manifest.
2222
Layers []Descriptor `json:"layers"`
23-
24-
// Refers links a manifest to another existing manifest.
25-
Refers *Descriptor `json:"refers,omitempty"`
2623
}
2724

2825
// Descriptor describes the disposition of targeted content.

conformance/setup.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,6 @@ func init() {
234234
}
235235
manifest.SchemaVersion = 2
236236

237-
// except for the first one, add "refers" field pointing to the last one
238-
if i > 0 {
239-
manifest.Refers = &Descriptor{
240-
MediaType: "application/vnd.oci.image.manifest.v1+json",
241-
Digest: godigest.Digest(manifests[i-1].Digest),
242-
Size: int64(len(manifests[i-1].Content)),
243-
}
244-
}
245-
246237
manifestContent, err := json.MarshalIndent(&manifest, "", "\t")
247238
if err != nil {
248239
log.Fatal(err)

0 commit comments

Comments
 (0)