cmdtest

package
v0.0.0-...-2bc12df Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient mocks a Wash API client

func (*MockClient) ActivityJournal

func (c *MockClient) ActivityJournal(index int, follow bool) (io.ReadCloser, error)

ActivityJournal mocks Client#ActivityJournal

func (*MockClient) Clear

func (c *MockClient) Clear(path string) ([]string, error)

Clear mocks Client#Clear

func (*MockClient) Delete

func (c *MockClient) Delete(path string) (bool, error)

Delete mocks Client#Delete

func (*MockClient) Exec

func (c *MockClient) Exec(path string, command string, args []string, opts apitypes.ExecOptions) (<-chan apitypes.ExecPacket, error)

Exec mocks Client#Exec

func (*MockClient) History

func (c *MockClient) History(follow bool) (chan apitypes.Activity, error)

History mocks Client#History

func (*MockClient) Info

func (c *MockClient) Info(path string) (apitypes.Entry, error)

Info mocks Client#Info

func (*MockClient) List

func (c *MockClient) List(path string) ([]apitypes.Entry, error)

List mocks Client#List

func (*MockClient) Metadata

func (c *MockClient) Metadata(path string) (map[string]interface{}, error)

Metadata mocks Client#Metadata

func (*MockClient) Schema

func (c *MockClient) Schema(path string) (*apitypes.EntrySchema, error)

Schema mocks Client#Schema

func (*MockClient) Screenview

func (c *MockClient) Screenview(name string, params analytics.Params) error

Screenview mocks Client#Screenview

func (*MockClient) Signal

func (c *MockClient) Signal(path string, signal string) error

Signal mocks Client#Signal

func (*MockClient) Stream

func (c *MockClient) Stream(path string) (io.ReadCloser, error)

Stream mocks Client#Stream

type Suite

type Suite struct {
	suite.Suite
	Client *MockClient
	// contains filtered or unexported fields
}

Suite represents a type that tests Wash subcommands

func (*Suite) SetupTest

func (s *Suite) SetupTest()

SetupTest mocks Stdout/Stderr/ColoredStderr/NewClient

func (*Suite) Stderr

func (s *Suite) Stderr() string

Stderr returns stderr's content

func (*Suite) Stdout

func (s *Suite) Stdout() string

Stdout returns stdout's content

func (*Suite) TearDownTest

func (s *Suite) TearDownTest()

TearDownTest resets Stdout/Stdout/ColoredStderr/NewClient

Jump to

Keyboard shortcuts

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