testing

package
v0.0.0-...-be26699 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2015 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = &params.Error{
	Message: "permission denied",
	Code:    params.CodeUnauthorized,
}

Functions

func AlreadyExistsError

func AlreadyExistsError(what string) *params.Error

func AssertNotImplemented

func AssertNotImplemented(c *gc.C, apiFacade interface{}, methodName string)

func AssertPrincipalServiceDeployed

func AssertPrincipalServiceDeployed(c *gc.C, st *state.State, serviceName string, curl *charm.URL, forced bool, bundle charm.Charm, cons constraints.Value) *state.Service

func NotAssignedError

func NotAssignedError(unitName string) *params.Error

func NotFoundError

func NotFoundError(prefixMessage string) *params.Error

func NotProvisionedError

func NotProvisionedError(machineId string) *params.Error

func PrefixedError

func PrefixedError(prefix, message string) *params.Error

func ServerError

func ServerError(message string) *params.Error

Types

type CharmStoreSuite

type CharmStoreSuite struct {
	gitjujutesting.CleanupSuite

	Session *mgo.Session
	// DischargeUser holds the identity of the user
	// that the 3rd party caveat discharger will issue
	// macaroons for. If it is empty, no caveats will be discharged.
	DischargeUser string

	Srv *charmstoretesting.Server
	// contains filtered or unexported fields
}

func (*CharmStoreSuite) SetUpTest

func (s *CharmStoreSuite) SetUpTest(c *gc.C)

func (*CharmStoreSuite) TearDownTest

func (s *CharmStoreSuite) TearDownTest(c *gc.C)

func (*CharmStoreSuite) UploadCharm

func (s *CharmStoreSuite) UploadCharm(c *gc.C, url, name string) (*charm.URL, charm.Charm)

type FakeAuthorizer

type FakeAuthorizer struct {
	Tag            names.Tag
	EnvironManager bool
}

FakeAuthorizer implements the common.Authorizer interface.

func (FakeAuthorizer) AuthClient

func (fa FakeAuthorizer) AuthClient() bool

AuthClient returns whether the authenticated entity is a client user.

func (FakeAuthorizer) AuthEnvironManager

func (fa FakeAuthorizer) AuthEnvironManager() bool

func (FakeAuthorizer) AuthMachineAgent

func (fa FakeAuthorizer) AuthMachineAgent() bool

AuthMachineAgent returns whether the current client is a machine agent.

func (FakeAuthorizer) AuthOwner

func (fa FakeAuthorizer) AuthOwner(tag names.Tag) bool

func (FakeAuthorizer) AuthUnitAgent

func (fa FakeAuthorizer) AuthUnitAgent() bool

AuthUnitAgent returns whether the current client is a unit agent.

func (FakeAuthorizer) GetAuthTag

func (fa FakeAuthorizer) GetAuthTag() names.Tag

Jump to

Keyboard shortcuts

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