Skip to content

Commit 3751369

Browse files
authored
Merge pull request #509 from q384566678/compatibility-test
compatibility_test.go:change manifest to manifestlist
2 parents 51653ef + c9935fb commit 3751369

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

schema/manifest_backwards_compatibility_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ func convertFormats(input string) string {
4545

4646
func TestBackwardsCompatibilityManifestList(t *testing.T) {
4747
for i, tt := range []struct {
48-
manifest string
48+
manifestlist string
4949
digest string
5050
fail bool
5151
}{
5252
{
5353
digest: "sha256:219f4b61132fe9d09b0ec5c15517be2ca712e4744b0e0cc3be71295b35b2a467",
54-
manifest: `{
54+
manifestlist: `{
5555
"schemaVersion": 2,
5656
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
5757
"manifests": [
@@ -110,14 +110,14 @@ func TestBackwardsCompatibilityManifestList(t *testing.T) {
110110
fail: false,
111111
},
112112
} {
113-
sum := sha256.Sum256([]byte(tt.manifest))
113+
sum := sha256.Sum256([]byte(tt.manifestlist))
114114
got := fmt.Sprintf("sha256:%s", hex.EncodeToString(sum[:]))
115115
if tt.digest != got {
116116
t.Errorf("test %d: expected digest %s but got %s", i, tt.digest, got)
117117
}
118118

119-
manifest := convertFormats(tt.manifest)
120-
r := strings.NewReader(manifest)
119+
manifestlist := convertFormats(tt.manifestlist)
120+
r := strings.NewReader(manifestlist)
121121
err := schema.MediaTypeManifestList.Validate(r)
122122

123123
if got := err != nil; tt.fail != got {

0 commit comments

Comments
 (0)