mocks

package
v0.0.0-...-5db00e0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 3 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 {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func (*Client) SetupDefaultMockTemplates

func (c *Client) SetupDefaultMockTemplates()

SetupDefaultMockTemplates is a helper which sets up the mocked Client.Templates()

func (*Client) SetupEmptyMockTemplates

func (c *Client) SetupEmptyMockTemplates()

SetupEmptyMockTemplates sets the mock to return an empty slice from Client.Templates()

func (*Client) SetupMockTemplates

func (c *Client) SetupMockTemplates(res pbs.Resources)

SetupMockTemplates sets the template returned by Client.Templates(). The template will have the given resources.

func (*Client) StartNode

func (_m *Client) StartNode(tplName string, serverAddress string, nodeID string) error

StartNode provides a mock function with given fields: tplName, serverAddress, nodeID

func (*Client) Templates

func (_m *Client) Templates() []scheduler.Node

Templates provides a mock function with given fields:

type Wrapper

type Wrapper struct {
	mock.Mock
}

Wrapper is an autogenerated mock type for the Wrapper type

func (*Wrapper) InsertInstance

func (_m *Wrapper) InsertInstance(project string, zone string, instance *compute.Instance) (*compute.Operation, error)

InsertInstance provides a mock function with given fields: project, zone, instance

func (*Wrapper) ListInstanceTemplates

func (_m *Wrapper) ListInstanceTemplates(project string) (*compute.InstanceTemplateList, error)

ListInstanceTemplates provides a mock function with given fields: project

func (*Wrapper) ListMachineTypes

func (_m *Wrapper) ListMachineTypes(project string, zone string) (*compute.MachineTypeList, error)

ListMachineTypes provides a mock function with given fields: project, zone

func (*Wrapper) SetupMockInstanceTemplates

func (wpr *Wrapper) SetupMockInstanceTemplates()

SetupMockInstanceTemplates is a helper which helps set up the wrapper mock to return a common instance template list.

func (*Wrapper) SetupMockMachineTypes

func (wpr *Wrapper) SetupMockMachineTypes()

SetupMockMachineTypes is a helper to set up the wrapper mock to return the a common machine type list from Wrapper.ListMachineTypes()

Jump to

Keyboard shortcuts

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