Align code to match order of fields
This is just cosmetic; alighn the fields with the order in which they appear in the struct (and JSON output). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
86cd830fb3
commit
19233195b7
9 changed files with 29 additions and 29 deletions
|
@ -150,9 +150,9 @@ func (b *bridge) createManifestEvent(action string, repo reference.Named, sm dis
|
|||
}
|
||||
|
||||
event.Target.MediaType = mt
|
||||
event.Target.Length = desc.Size
|
||||
event.Target.Size = desc.Size
|
||||
event.Target.Digest = desc.Digest
|
||||
event.Target.Size = desc.Size
|
||||
event.Target.Length = desc.Size
|
||||
if b.includeReferences {
|
||||
event.Target.References = append(event.Target.References, manifest.References()...)
|
||||
}
|
||||
|
|
|
@ -116,28 +116,28 @@ func TestEventEnvelopeJSONFormat(t *testing.T) {
|
|||
|
||||
manifestPush := prototype
|
||||
manifestPush.ID = "asdf-asdf-asdf-asdf-0"
|
||||
manifestPush.Target.Digest = "sha256:0123456789abcdef0"
|
||||
manifestPush.Target.Length = 1
|
||||
manifestPush.Target.Size = 1
|
||||
manifestPush.Target.MediaType = schema1.MediaTypeSignedManifest
|
||||
manifestPush.Target.Digest = "sha256:0123456789abcdef0"
|
||||
manifestPush.Target.Size = 1
|
||||
manifestPush.Target.Length = 1
|
||||
manifestPush.Target.Repository = "library/test"
|
||||
manifestPush.Target.URL = "http://example.com/v2/library/test/manifests/latest"
|
||||
|
||||
layerPush0 := prototype
|
||||
layerPush0.ID = "asdf-asdf-asdf-asdf-1"
|
||||
layerPush0.Target.Digest = "sha256:3b3692957d439ac1928219a83fac91e7bf96c153725526874673ae1f2023f8d5"
|
||||
layerPush0.Target.Length = 2
|
||||
layerPush0.Target.Size = 2
|
||||
layerPush0.Target.MediaType = layerMediaType
|
||||
layerPush0.Target.Digest = "sha256:3b3692957d439ac1928219a83fac91e7bf96c153725526874673ae1f2023f8d5"
|
||||
layerPush0.Target.Size = 2
|
||||
layerPush0.Target.Length = 2
|
||||
layerPush0.Target.Repository = "library/test"
|
||||
layerPush0.Target.URL = "http://example.com/v2/library/test/manifests/latest"
|
||||
|
||||
layerPush1 := prototype
|
||||
layerPush1.ID = "asdf-asdf-asdf-asdf-2"
|
||||
layerPush1.Target.Digest = "sha256:3b3692957d439ac1928219a83fac91e7bf96c153725526874673ae1f2023f8d6"
|
||||
layerPush1.Target.Length = 3
|
||||
layerPush1.Target.Size = 3
|
||||
layerPush1.Target.MediaType = layerMediaType
|
||||
layerPush1.Target.Digest = "sha256:3b3692957d439ac1928219a83fac91e7bf96c153725526874673ae1f2023f8d6"
|
||||
layerPush1.Target.Size = 3
|
||||
layerPush1.Target.Length = 3
|
||||
layerPush1.Target.Repository = "library/test"
|
||||
layerPush1.Target.URL = "http://example.com/v2/library/test/manifests/latest"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue