testing

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MultilineEquals = &multilineEqualsChecker{
	&check.CheckerInfo{
		Name:   "MultilineEquals",
		Params: []string{"obtained", "expected"},
	},
}
View Source
var TestPlan = `` /* 292-byte string literal not displayed */

Functions

This section is empty.

Types

type MockPlanClient

type MockPlanClient struct {
	*jujutesting.Stub
	PlanDetails   *wireformat.PlanDetails
	PlanRevisions []wireformat.Plan
	Released      bool
}

MockPlanClient implements a mock of the plan api client.

func NewMockPlanClient

func NewMockPlanClient() *MockPlanClient

NewMockPlanClient returns a new MockPlanClient

func (*MockPlanClient) AddCharm

func (m *MockPlanClient) AddCharm(plan, charmURL string, isDefault bool) error

AddCharm adds a charm to an existing plan

func (*MockPlanClient) Authorize

func (m *MockPlanClient) Authorize(environmentUUID, charmURL, serviceName, plan string) (*macaroon.Macaroon, error)

Authorize returns the authorization macaroon for the specified environment, charm url and service name.

func (*MockPlanClient) AuthorizeReseller

func (m *MockPlanClient) AuthorizeReseller(plan, charm, application, applicationOwner, applicationUser string) (*macaroon.Macaroon, error)

AuthorizeReseller returns the reseller authorization macaroon for the specified application.

func (*MockPlanClient) Get

func (m *MockPlanClient) Get(planURL string) ([]wireformat.Plan, error)

Get returns all plans stored in the mock, regardless of the query.

func (*MockPlanClient) GetAuthorizations

func (m *MockPlanClient) GetAuthorizations(query wireformat.AuthorizationQuery) ([]wireformat.Authorization, error)

GetAuthorizations returns a slice of Authorizations that match the criteria specified in the query.

func (*MockPlanClient) GetDefaultPlan

func (m *MockPlanClient) GetDefaultPlan(charmURL string) (*wireformat.Plan, error)

func (*MockPlanClient) GetPlanDetails

func (m *MockPlanClient) GetPlanDetails(planURL string) (*wireformat.PlanDetails, error)

GetPlanDetails returns detailed information about a plan.

func (*MockPlanClient) GetPlanRevisions

func (m *MockPlanClient) GetPlanRevisions(plan string) ([]wireformat.Plan, error)

GetPlanRevisions returns all revisions of a plan.

func (*MockPlanClient) GetPlansForCharm

func (m *MockPlanClient) GetPlansForCharm(charmURL string) ([]wireformat.Plan, error)

func (*MockPlanClient) GetResellerAuthorizations

GetResellerAuthorizations retuns a slice of reseller Authorizations.

func (*MockPlanClient) Release

func (m *MockPlanClient) Release(planURL string) (*wireformat.Plan, error)

Release releases the specified plan.

func (*MockPlanClient) Resume

func (m *MockPlanClient) Resume(planURL string, all bool, charmURLs ...string) error

Resume resumes the plan for specified charms.

func (*MockPlanClient) Save

func (m *MockPlanClient) Save(planURL, definition string) (*wireformat.Plan, error)

Save stores the plan in the mock.

func (*MockPlanClient) Suspend

func (m *MockPlanClient) Suspend(planURL string, all bool, charmURLs ...string) error

Suspend suspends the plan for specified charms.

Jump to

Keyboard shortcuts

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