test

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMarketplaceVMOffer

func NewMarketplaceVMOffer() *partner.Offer

NewMarketplaceVMOffer returns a valid offer for testing

func NewTmpFile

func NewTmpFile(t *testing.T, prefix string) (string, func())

func NewTmpFileFromOffer

func NewTmpFileFromOffer(t *testing.T, prefix string, offer *partner.Offer) (string, func())

func NewTmpOfferFile

func NewTmpOfferFile(t *testing.T, prefix string) (string, func())

func QuietCommand

func QuietCommand(cmd *cobra.Command, err error) (*cobra.Command, error)

QuietCommand turns off usage and error reporting to quiet down test output

func VerifyCloudPartnerServiceCommand

func VerifyCloudPartnerServiceCommand(t *testing.T, cmdFactory func(service.CommandServicer) (*cobra.Command, error), args ...string)

VerifyCloudPartnerServiceCommand will test for the cmds use of Cloud Partner Service error handling

func VerifyFailsOnArgs

func VerifyFailsOnArgs(t *testing.T, cmdFactory func(servicer service.CommandServicer) (*cobra.Command, error), args ...string)

VerifyFailsOnArgs will run a command with args and report of it fails

Types

type CloudPartnerServiceMock

type CloudPartnerServiceMock struct {
	mock.Mock
}

func (*CloudPartnerServiceMock) CancelOperation

func (cpsm *CloudPartnerServiceMock) CancelOperation(ctx context.Context, params partner.CancelOperationParams) (string, error)

func (*CloudPartnerServiceMock) GetOffer

func (*CloudPartnerServiceMock) GetOfferBySlot

func (*CloudPartnerServiceMock) GetOfferByVersion

func (cpsm *CloudPartnerServiceMock) GetOfferByVersion(ctx context.Context, params partner.ShowOfferByVersionParams) (*partner.Offer, error)

func (*CloudPartnerServiceMock) GetOfferStatus

func (*CloudPartnerServiceMock) GetOperation

func (*CloudPartnerServiceMock) GetOperationByURI

func (cpsm *CloudPartnerServiceMock) GetOperationByURI(ctx context.Context, opURI string) (*partner.OperationDetail, error)

func (*CloudPartnerServiceMock) GoLiveWithOffer

func (cpsm *CloudPartnerServiceMock) GoLiveWithOffer(ctx context.Context, params partner.GoLiveParams) (string, error)

func (*CloudPartnerServiceMock) ListOffers

func (*CloudPartnerServiceMock) ListOperations

func (*CloudPartnerServiceMock) ListPublishers

func (cpsm *CloudPartnerServiceMock) ListPublishers(ctx context.Context) ([]partner.Publisher, error)

func (*CloudPartnerServiceMock) PublishOffer

func (cpsm *CloudPartnerServiceMock) PublishOffer(ctx context.Context, params partner.PublishOfferParams) (string, error)

func (*CloudPartnerServiceMock) PutOffer

func (cpsm *CloudPartnerServiceMock) PutOffer(ctx context.Context, offer *partner.Offer) (*partner.Offer, error)

type PrinterMock

type PrinterMock struct {
	mock.Mock
}

func (*PrinterMock) ErrPrintf

func (pm *PrinterMock) ErrPrintf(format string, objs ...interface{})

func (*PrinterMock) Print

func (pm *PrinterMock) Print(obj interface{}) error

type RegistryMock

type RegistryMock struct {
	mock.Mock
}

func (*RegistryMock) GetCloudPartnerService

func (rm *RegistryMock) GetCloudPartnerService() (service.CloudPartnerServicer, error)

func (*RegistryMock) GetPrinter

func (rm *RegistryMock) GetPrinter() format.Printer

Jump to

Keyboard shortcuts

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