diff --git a/integration/copy_test.go b/integration/copy_test.go index e42908e2..bd15c2e4 100644 --- a/integration/copy_test.go +++ b/integration/copy_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "io/ioutil" + "log" "net/http" "net/http/httptest" "os" @@ -14,6 +15,7 @@ import ( "github.com/containers/image/signature" "github.com/go-check/check" "github.com/opencontainers/go-digest" + "github.com/opencontainers/image-tools/image" ) func init() { @@ -241,13 +243,15 @@ func (s *CopySuite) TestCopyOCIRoundTrip(c *check.C) { c.Assert(out, check.Equals, "") // For some silly reason we pass a logger to the OCI library here... - //logger := log.New(os.Stderr, "", 0) + logger := log.New(os.Stderr, "", 0) - // TODO: Verify using the upstream OCI image validator. - //err = image.ValidateLayout(oci1, nil, logger) - //c.Assert(err, check.IsNil) - //err = image.ValidateLayout(oci2, nil, logger) - //c.Assert(err, check.IsNil) + // Verify using the upstream OCI image validator, this should catch most + // non-compliance errors. DO NOT REMOVE THIS TEST UNLESS IT'S ABSOLUTELY + // NECESSARY. + err = image.ValidateLayout(oci1, nil, logger) + c.Assert(err, check.IsNil) + err = image.ValidateLayout(oci2, nil, logger) + c.Assert(err, check.IsNil) // Now verify that everything is identical. Currently this is true, but // because we recompute the manifests on-the-fly this doesn't necessarily