Documentation ¶
Overview ¶
This package provides helpers for testing with resources.
Index ¶
- func NewCharmDockerResource(c *gc.C, name, content string) charmresource.Resource
- func NewCharmResource(c *gc.C, name, content string) charmresource.Resource
- func NewDockerResource(c *gc.C, stub *testing.Stub, name, applicationID, content string) resource.Opened
- func NewPlaceholderResource(c *gc.C, name, applicationID string) resource.Resource
- func NewResource(c *gc.C, stub *testing.Stub, name, applicationID, content string) resource.Opened
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCharmDockerResource ¶
func NewCharmDockerResource(c *gc.C, name, content string) charmresource.Resource
NewCharmDockerResource produces basic docker resource info for the given name and content. The origin is set set to "upload".
func NewCharmResource ¶
func NewCharmResource(c *gc.C, name, content string) charmresource.Resource
NewCharmResource produces basic resource info for the given name and content. The origin is set set to "upload".
func NewDockerResource ¶
func NewDockerResource(c *gc.C, stub *testing.Stub, name, applicationID, content string) resource.Opened
NewDockerResource produces full resource info for the given name and content. The origin is set set to "upload" (via resource created by NewCharmDockerResource). A reader is also returned which contains the content.
func NewPlaceholderResource ¶
NewPlaceholderResource returns resource info for a resource that has not been uploaded or pulled from the charm store yet. The origin is set to "upload".
Types ¶
This section is empty.