Replace native Go testing patterns (t.Errorf, t.Fatalf, t.Error,
t.Fatal) with github.com/stretchr/testify equivalents (assert.X,
require.X) for improved test readability and error messages.
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
require.NoError(t,err,"%s annotation with value '%s' not in RFC3339 format",ocispec.AnnotationCreated,result[ocispec.AnnotationCreated])
// Verify creation annotation after time test began
if!nowTime.Before(createdTimeAnnotation){
t.Errorf("%s annotation with value '%s' not configured properly. Annotation value is not after %s",ocispec.AnnotationCreated,result[ocispec.AnnotationCreated],nowTimeString)
}
}
// Verify creation annotation after (or equals) time test began
assert.False(t,nowTime.Before(createdTimeAnnotation),"%s annotation with value '%s' not configured properly. Annotation value is not after %s",ocispec.AnnotationCreated,result[ocispec.AnnotationCreated],nowTimeString)