testutil

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a sugarcoat version of the docker client

func NewDockerClient added in v0.1.1

func NewDockerClient() (*Client, error)

NewClient creates a new docker Client

func (*Client) Clean

func (c *Client) Clean()

func (*Client) Create

func (c *Client) Create(ctx context.Context, node *proto.Node) (string, error)

Create creates a docker container

func (*Client) CreateResource added in v0.1.1

func (c *Client) CreateResource(node *proto.Node) (*proto.Node, error)

func (*Client) DeleteResource added in v0.1.1

func (c *Client) DeleteResource(node *proto.Node) (*proto.Node, error)

func (*Client) Destroy added in v0.1.2

func (c *Client) Destroy(indx int)

func (*Client) Exec

func (c *Client) Exec(handler string, path string, args ...string) error

func (*Client) GetIP

func (c *Client) GetIP(id string) string

func (*Client) PullImage

func (c *Client) PullImage(ctx context.Context, image string) error

PullImage pulls a docker image

func (*Client) Remove

func (c *Client) Remove(id string) error

func (*Client) Setup added in v0.1.1

func (c *Client) Setup() error

func (*Client) Start added in v0.1.1

func (c *Client) Start() error

func (*Client) WatchUpdates added in v0.1.2

func (c *Client) WatchUpdates() chan *operator.NodeUpdate

type TestServer added in v0.1.1

type TestServer struct {
	// contains filtered or unexported fields
}

func TestOperator added in v0.1.1

func TestOperator(t *testing.T, factory operator.HandlerFactory) *TestServer

func (*TestServer) Apply added in v0.1.1

func (t *TestServer) Apply(c *proto.Component) string

func (*TestServer) Close added in v0.1.1

func (t *TestServer) Close()

func (*TestServer) Destroy added in v0.1.2

func (t *TestServer) Destroy(i int)

func (*TestServer) WaitForTask added in v0.1.1

func (t *TestServer) WaitForTask(id string)

Jump to

Keyboard shortcuts

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