Skip to content

Commit fdb53f8

Browse files
committed
point to manifest vs config digest
Signed-off-by: Josh Dolitsky <[email protected]>
1 parent 76825a3 commit fdb53f8

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

conformance/03_discovery_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,20 @@ var test03ContentDiscovery = func() {
5757
BeNumerically("<", 300)))
5858
})
5959

60+
g.Specify("Populate registry with referred-to manifest", func() {
61+
SkipIfDisabled(contentDiscovery)
62+
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)
67+
resp, err := client.Do(req)
68+
Expect(err).To(BeNil())
69+
Expect(resp.StatusCode()).To(SatisfyAll(
70+
BeNumerically(">=", 200),
71+
BeNumerically("<", 300)))
72+
})
73+
6074
g.Specify("Populate registry with test tags", func() {
6175
SkipIfDisabled(contentDiscovery)
6276
RunOnlyIf(runContentDiscoverySetup)
@@ -79,20 +93,6 @@ var test03ContentDiscovery = func() {
7993
_ = err
8094
})
8195

82-
g.Specify("Populate registry with referred-to manifest", func() {
83-
SkipIfDisabled(contentDiscovery)
84-
RunOnlyIf(runContentDiscoverySetup)
85-
req := client.NewRequest(reggie.PUT, "/v2/<name>/manifests/<reference>",
86-
reggie.WithReference("test-something-points-to-me")).
87-
SetHeader("Content-Type", "application/vnd.oci.image.manifest.v1+json").
88-
SetBody(manifests[1].Content)
89-
resp, err := client.Do(req)
90-
Expect(err).To(BeNil())
91-
Expect(resp.StatusCode()).To(SatisfyAll(
92-
BeNumerically(">=", 200),
93-
BeNumerically("<", 300)))
94-
})
95-
9696
g.Specify("Populate registry with test tags (no push)", func() {
9797
SkipIfDisabled(contentDiscovery)
9898
RunOnlyIfNot(runContentDiscoverySetup)

conformance/setup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ func init() {
238238
if i > 0 {
239239
manifest.Refers = &Descriptor{
240240
MediaType: "application/vnd.oci.image.manifest.v1+json",
241-
Digest: godigest.Digest(configs[i-1].Digest),
242-
Size: int64(len(configs[i-1].Content)),
241+
Digest: godigest.Digest(manifests[i-1].Digest),
242+
Size: int64(len(manifests[i-1].Content)),
243243
}
244244
}
245245

0 commit comments

Comments
 (0)