juju: github.com/juju/juju/resource/resourcetesting Index | Files

package resourcetesting

import "github.com/juju/juju/resource/resourcetesting"

This package provides helpers for testing with resources.

Index

Package Files

resource.go

func NewCharmDockerResource Uses

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 Uses

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 Uses

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 Uses

func NewPlaceholderResource(c *gc.C, name, applicationID string) resource.Resource

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".

func NewResource Uses

func NewResource(c *gc.C, stub *testing.Stub, name, applicationID, content string) resource.Opened

NewResource produces full resource info for the given name and content. The origin is set set to "upload". A reader is also returned which contains the content.

Package resourcetesting imports 9 packages (graph). Updated 2018-08-18. Refresh now. Tools for package owners.