Fix content type for schema1 signed manifests

The Payload function for schema1 currently returns a signed manifest,
but indicates the content type is that of a manifest that isn't signed.

Note that this breaks compatibility with Registry 2.3 alpha 1 and
Docker 1.10-rc1, because they use the incorrect content type.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann 2016-01-18 10:26:45 -08:00
parent 3cb403ae5b
commit 8c1a000799
5 changed files with 13 additions and 13 deletions

View file

@ -21,7 +21,7 @@ func TestEventEnvelopeJSONFormat(t *testing.T) {
"timestamp": "2006-01-02T15:04:05Z",
"action": "push",
"target": {
"mediaType": "application/vnd.docker.distribution.manifest.v1+json",
"mediaType": "application/vnd.docker.distribution.manifest.v1+prettyjws",
"size": 1,
"digest": "sha256:0123456789abcdef0",
"length": 1,
@ -120,7 +120,7 @@ func TestEventEnvelopeJSONFormat(t *testing.T) {
manifestPush.Target.Digest = "sha256:0123456789abcdef0"
manifestPush.Target.Length = 1
manifestPush.Target.Size = 1
manifestPush.Target.MediaType = schema1.MediaTypeManifest
manifestPush.Target.MediaType = schema1.MediaTypeSignedManifest
manifestPush.Target.Repository = "library/test"
manifestPush.Target.URL = "http://example.com/v2/library/test/manifests/latest"