testing

package
v0.0.0-...-a7271ac Latest Latest
Warning

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

Go to latest
Published: May 4, 2014 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStore

type MockStore struct {
	Downloads               []*charm.URL
	DownloadsNoStats        []*charm.URL
	Authorizations          []string
	Metadata                []string
	InfoRequestCount        int
	InfoRequestCountNoStats int
	// contains filtered or unexported fields
}

MockStore provides a mock charm store implementation useful when testing.

func NewMockStore

func NewMockStore(c *gc.C, charms map[string]int) *MockStore

NewMockStore creates a mock charm store containing the specified charms.

func (*MockStore) Address

func (s *MockStore) Address() string

Address returns the URL used to make requests to the mock store.

func (*MockStore) Close

func (s *MockStore) Close()

Close closes the mock store's socket.

func (*MockStore) ServeHTTP

func (s *MockStore) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.ServeHTTP

func (*MockStore) UpdateStoreRevision

func (s *MockStore) UpdateStoreRevision(ch string, rev int)

UpdateStoreRevision sets the revision of the specified charm to rev.

Jump to

Keyboard shortcuts

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