resourcetesting

package
v0.0.0-...-8ff1004 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

This package provides helpers for testing with resources.

Index

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

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

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL