test

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APICaller

func APICaller() sacloud.APICaller

func RunColumnDefTest

func RunColumnDefTest(t *testing.T, targets ColumnDefTestTargets)

Types

type ColumnDefTestTarget

type ColumnDefTestTarget struct {
	ColumnName string
	Expect     string
}

type ColumnDefTestTargets

type ColumnDefTestTargets struct {
	ColumnDefs []output.ColumnDef
	Source     interface{}
	Tests      []*ColumnDefTestTarget
}

func (*ColumnDefTestTargets) ColumnDef

func (c *ColumnDefTestTargets) ColumnDef(name string) (output.ColumnDef, bool)

type DummyCLIContext

type DummyCLIContext struct {
	DummyValue *DummyCLIContextValue
}

func (*DummyCLIContext) Args

func (c *DummyCLIContext) Args() []string

func (*DummyCLIContext) Client

func (c *DummyCLIContext) Client() sacloud.APICaller

func (*DummyCLIContext) CommandName

func (c *DummyCLIContext) CommandName() string

func (*DummyCLIContext) Deadline

func (c *DummyCLIContext) Deadline() (deadline time.Time, ok bool)

func (*DummyCLIContext) Done

func (c *DummyCLIContext) Done() <-chan struct{}

func (*DummyCLIContext) Err

func (c *DummyCLIContext) Err() error

func (*DummyCLIContext) ID

func (c *DummyCLIContext) ID() types.ID

func (*DummyCLIContext) IO

func (c *DummyCLIContext) IO() cli.IO

func (*DummyCLIContext) Option

func (c *DummyCLIContext) Option() *config.Config

func (*DummyCLIContext) Output

func (c *DummyCLIContext) Output() output.Output

func (*DummyCLIContext) Resource

func (c *DummyCLIContext) Resource() interface{}

func (*DummyCLIContext) ResourceName

func (c *DummyCLIContext) ResourceName() string

func (*DummyCLIContext) Value

func (c *DummyCLIContext) Value(key interface{}) interface{}

func (*DummyCLIContext) WithResource

func (c *DummyCLIContext) WithResource(id types.ID, zone string, resource interface{}) cli.Context

func (*DummyCLIContext) Zone

func (c *DummyCLIContext) Zone() string

type DummyCLIContextValue

type DummyCLIContextValue struct {
	Context      context.Context
	IO           cli.IO
	Option       *config.Config
	Output       output.Output
	ResourceName string
	CommandName  string
	ID           types.ID
	Zone         string
	Resource     interface{}
	Args         []string
}

type DummyIO

type DummyIO struct {
	DummyValue *DummyIOValue
}

func (*DummyIO) Err

func (io *DummyIO) Err() io.Writer

func (*DummyIO) In

func (io *DummyIO) In() *os.File

func (*DummyIO) Out

func (io *DummyIO) Out() io.Writer

func (*DummyIO) Progress

func (io *DummyIO) Progress() io.Writer

type DummyIOValue

type DummyIOValue struct {
	In       *os.File
	Out      io.Writer
	Progress io.Writer
	Err      io.Writer
}

Jump to

Keyboard shortcuts

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