Ejemplo n.º 1
0
func checkMetadata(c *gc.C, fromDb, metadata *imagestorage.Metadata) {
	c.Assert(fromDb.Created.IsZero(), jc.IsFalse)
	// We don't want Now() here, we want NonZeroTime().Add(...). Before
	// that can happen, we need to look at AddImage for its Created
	// timestamp.
	c.Assert(fromDb.Created.Before(time.Now()), jc.IsTrue)
	fromDb.Created = testing.ZeroTime()
	c.Assert(metadata, gc.DeepEquals, fromDb)
}
Ejemplo n.º 2
0
func checkMetadata(c *gc.C, fromDb, metadata *imagestorage.Metadata) {
	c.Assert(fromDb.Created.IsZero(), jc.IsFalse)
	c.Assert(fromDb.Created.Before(time.Now()), jc.IsTrue)
	fromDb.Created = time.Time{}
	c.Assert(metadata, gc.DeepEquals, fromDb)
}