Documentation ¶
Overview ¶
Package testcharms holds a corpus of charms for testing.
Index ¶
- Variables
- func SetPublic(c *gc.C, client *csclient.Client, id *charm.URL)
- func SetPublicWithResources(c *gc.C, client *csclient.Client, id *charm.URL, resources map[string]int)
- func UploadBundle(c *gc.C, client *csclient.Client, url, name string) (*charm.URL, charm.Bundle)
- func UploadCharm(c *gc.C, client *csclient.Client, url, name string) (*charm.URL, charm.Charm)
- func UploadCharmMultiSeries(c *gc.C, client *csclient.Client, url, name string) (*charm.URL, charm.Charm)
- func UploadCharmWithMeta(c *gc.C, client *csclient.Client, charmURL, meta, metrics string, revision int) (*charm.URL, charm.Charm)
Constants ¶
This section is empty.
Variables ¶
var Repo = testing.NewRepo("charm-repo", "quantal")
Repo provides access to the test charm repository.
Functions ¶
func SetPublic ¶
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 ¶
UploadBundle uploads a bundle using the given charm store client, and returns the resulting bundle URL and bundle.
func UploadCharm ¶
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.