charmstoretesting

package
v4.0.0-...-b90d246 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2015 License: AGPL-3.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// If params.AuthUsername or params.AuthPassword are empty,
	// AuthUsername and AuthPassword will be used.
	AuthUsername = "charmstore-testing-user"
	AuthPassword = "charmstore-testing-password"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a charm store testing server.

func OpenServer

func OpenServer(c *gc.C, session *mgo.Session, params charmstore.ServerParams) *Server

OpenServer instantiates a new charm store server instance. Callers are responsible of closing the server by calling Close().

func (*Server) Close

func (s *Server) Close()

Close shuts down the server.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the HTTP handler used by this server.

func (*Server) NewClient

func (s *Server) NewClient() *csclient.Client

NewClient returns a new client that will talk to the Server using basic (non-macaroon) authentication.

func (*Server) URL

func (s *Server) URL() string

URL returns the URL the testing charm store is listening to.

func (*Server) UploadCharm

func (s *Server) UploadCharm(c *gc.C, ch charm.Charm, id *charm.Reference, promulgated bool) *charm.Reference

UploadCharm uploads the given charm to the testing charm store. The given id must include the charm user, series and revision. If promulgated is true, the charm will be promulgated.

Jump to

Keyboard shortcuts

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