Beispiel #1
0
func (s *FactorySuite) AssertStorageContext(c *gc.C, ctx runner.Context, id string, attachment storage.StorageAttachmentInfo) {
	fromCache, ok := ctx.HookStorage()
	c.Assert(ok, jc.IsTrue)
	c.Assert(fromCache, gc.NotNil)
	c.Assert(fromCache.Tag().Id(), gc.Equals, id)
	c.Assert(fromCache.Kind(), gc.Equals, attachment.Kind)
	c.Assert(fromCache.Location(), gc.Equals, attachment.Location)
}
Beispiel #2
0
func (s *FactorySuite) AssertNotStorageContext(c *gc.C, ctx runner.Context) {
	storageAttachment, ok := ctx.HookStorage()
	c.Assert(storageAttachment, gc.IsNil)
	c.Assert(ok, jc.IsFalse)
}