testcharms

package
v0.0.0-...-4bd6544 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package testcharms holds a corpus of charms for testing.

Index

Constants

This section is empty.

Variables

View Source
var Repo = testing.NewRepo("charm-repo", "quantal")

Repo provides access to the test charm repository.

Functions

func SetPublic

func SetPublic(c *gc.C, client *csclient.Client, id *charm.URL)

SetPublic sets the charm or bundle with the given id to be published with global read permissions to the stable channel.

func SetPublicWithResources

func SetPublicWithResources(c *gc.C, client *csclient.Client, id *charm.URL, resources map[string]int)

SetPublicWithResources sets the charm or bundle with the given id to be published with global read permissions to the stable channel.

The named resources with their associated revision numbers are also published.

func UploadBundle

func UploadBundle(c *gc.C, client *csclient.Client, url, name string) (*charm.URL, charm.Bundle)

UploadBundle uploads a bundle using the given charm store client, and returns the resulting bundle URL and bundle.

func UploadCharm

func UploadCharm(c *gc.C, client *csclient.Client, url, name string) (*charm.URL, charm.Charm)

UploadCharm uploads a charm using the given charm store client, and returns the resulting charm URL and charm.

It also adds any required resources that haven't already been uploaded with the content "<resourcename> content".

func UploadCharmMultiSeries

func UploadCharmMultiSeries(c *gc.C, client *csclient.Client, url, name string) (*charm.URL, charm.Charm)

UploadCharmMultiSeries uploads a charm with revision using the given charm store client, and returns the resulting charm URL and charm. This API caters for new multi-series charms which do not specify a series in the URL.

func UploadCharmWithMeta

func UploadCharmWithMeta(c *gc.C, client *csclient.Client, charmURL, meta, metrics string, revision int) (*charm.URL, charm.Charm)

UploadCharmWithMeta pushes a new charm to the charmstore. The uploaded charm takes the supplied charmURL with metadata.yaml and metrics.yaml to define the charm, rather than relying on the charm to exist on disk. This allows you to create charm definitions directly in yaml and have them uploaded here for us in tests.

For convenience the charm is also made public

Types

This section is empty.

Jump to

Keyboard shortcuts

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