Update test asserts

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos 2023-08-21 10:27:46 +01:00
parent 11c341a369
commit df2787c6cf
No known key found for this signature in database
GPG key ID: 01300E5E6D417439

View file

@ -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
}