From df2787c6cf8faeb0edcc3dbc8815b02c805132e6 Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Mon, 21 Aug 2023 10:27:46 +0100 Subject: [PATCH] Update test asserts Signed-off-by: Milos Gajdos --- registry/client/repository_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/registry/client/repository_test.go b/registry/client/repository_test.go index 7448243e..838c1621 100644 --- a/registry/client/repository_test.go +++ b/registry/client/repository_test.go @@ -1053,10 +1053,15 @@ func addTestManifestWithoutDigestHeader(repo reference.Named, reference string, } func checkEqualManifest(m1, m2 *ocischema.DeserializedManifest) error { - if !reflect.DeepEqual(m1.Config, m2.Config) { - return fmt.Errorf("config do not match %v != %v", m1.Config, m2.Config) + if !reflect.DeepEqual(m1.Versioned, m2.Versioned) { + return fmt.Errorf("versions do not match: %v != %v", m1.Versioned, m2.Versioned) + } + if !reflect.DeepEqual(m1.Config, m2.Config) { + return fmt.Errorf("config do not match: %v != %v", m1.Config, m2.Config) + } + if !reflect.DeepEqual(m1.Layers, m2.Layers) { + return fmt.Errorf("layers do not match: %v != %v", m1.Layers, m2.Layers) } - // TODO(rest of the fields) return nil }