Skip to content

Commit f544320

Browse files
committed
schema: Drop self-describing media types from manifest(-list) tests
Catching up with 5fc84e5 (specs-go: clarify mediatypes, 2016-10-20, #411). Signed-off-by: W. Trevor King <[email protected]>
1 parent 133e998 commit f544320

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

schema/manifest_test.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ func TestManifest(t *testing.T) {
3131
manifest: `
3232
{
3333
"schemaVersion": 2,
34-
"mediaType": "invalid",
3534
"config": {
36-
"mediaType": "application/vnd.oci.image.config.v1+json",
35+
"mediaType": "invalid",
3736
"size": 1470,
3837
"digest": "sha256:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b"
3938
},
@@ -54,7 +53,6 @@ func TestManifest(t *testing.T) {
5453
manifest: `
5554
{
5655
"schemaVersion": 2,
57-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
5856
"config": {
5957
"mediaType": "application/vnd.oci.image.config.v1+json",
6058
"size": "1470",
@@ -77,7 +75,6 @@ func TestManifest(t *testing.T) {
7775
manifest: `
7876
{
7977
"schemaVersion": 2,
80-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
8178
"config": {
8279
"mediaType": "application/vnd.oci.image.config.v1+json",
8380
"size": 1470,
@@ -100,7 +97,6 @@ func TestManifest(t *testing.T) {
10097
manifest: `
10198
{
10299
"schemaVersion": 2,
103-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
104100
"config": {
105101
"mediaType": "application/vnd.oci.image.config.v1+json",
106102
"size": 1470,
@@ -117,7 +113,6 @@ func TestManifest(t *testing.T) {
117113
manifest: `
118114
{
119115
"schemaVersion": 2,
120-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
121116
"config": {
122117
"mediaType": "application/vnd.oci.image.config.v1+json",
123118
"size": 1470,
@@ -154,7 +149,6 @@ func TestManifest(t *testing.T) {
154149
manifest: `
155150
{
156151
"schemaVersion": 2,
157-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
158152
"config": {
159153
"mediaType": "application/vnd.oci.image.config.v1+json",
160154
"size": 1470,
@@ -187,7 +181,6 @@ func TestManifest(t *testing.T) {
187181
manifest: `
188182
{
189183
"schemaVersion": 2,
190-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
191184
"config": {
192185
"mediaType": "application/vnd.oci.image.config.v1+json",
193186
"size": 1470,

schema/manifestlist_test.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ func TestManifestList(t *testing.T) {
3131
manifestList: `
3232
{
3333
"schemaVersion": 2,
34-
"mediaType": "invalid",
3534
"manifests": [
3635
{
37-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
36+
"mediaType": "invalid",
3837
"size": 7143,
3938
"digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f",
4039
"platform": {
@@ -53,7 +52,6 @@ func TestManifestList(t *testing.T) {
5352
manifestList: `
5453
{
5554
"schemaVersion": 2,
56-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
5755
"manifests": [
5856
{
5957
"mediaType": "application/vnd.oci.image.manifest.v1+json",
@@ -78,7 +76,6 @@ func TestManifestList(t *testing.T) {
7876
manifestList: `
7977
{
8078
"schemaVersion": 2,
81-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
8279
"manifests": [
8380
{
8481
"mediaType": "application/vnd.oci.image.manifest.v1+json",
@@ -102,7 +99,6 @@ func TestManifestList(t *testing.T) {
10299
manifestList: `
103100
{
104101
"schemaVersion": 2,
105-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
106102
"manifests": [
107103
{
108104
"mediaType": "application/vnd.oci.image.manifest.v1+json",
@@ -120,7 +116,6 @@ func TestManifestList(t *testing.T) {
120116
manifestList: `
121117
{
122118
"schemaVersion": 2,
123-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
124119
"manifests": [
125120
{
126121
"mediaType": "invalid",
@@ -145,7 +140,6 @@ func TestManifestList(t *testing.T) {
145140
manifestList: `
146141
{
147142
"schemaVersion": 2,
148-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
149143
"manifests": [
150144
{
151145
"mediaType": "",
@@ -170,7 +164,6 @@ func TestManifestList(t *testing.T) {
170164
manifestList: `
171165
{
172166
"schemaVersion": 2,
173-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
174167
"manifests": [
175168
{
176169
"mediaType": "application/vnd.oci.image.manifest.v1+json",
@@ -208,7 +201,6 @@ func TestManifestList(t *testing.T) {
208201
manifestList: `
209202
{
210203
"schemaVersion": 2,
211-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
212204
"manifests": [
213205
{
214206
"mediaType": "application/vnd.oci.image.manifest.v1+json",
@@ -230,7 +222,6 @@ func TestManifestList(t *testing.T) {
230222
manifestList: `
231223
{
232224
"schemaVersion": 2,
233-
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
234225
"manifests": [
235226
{
236227
"mediaType": "application/customized.manifest+json",

0 commit comments

Comments
 (0)