integration

package
v3.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapTester

type BootstrapTester struct {
	Name       string
	Args       []string
	Env        []string
	HomeDir    string
	PathDir    string
	BuildDir   string
	HooksDir   string
	PluginsDir string
	Repo       *gitRepository
	Output     string
	// contains filtered or unexported fields
}

BootstrapTester invokes a buildkite-agent bootstrap script with a temporary environment

func NewBootstrapTester

func NewBootstrapTester() (*BootstrapTester, error)

func (*BootstrapTester) Cancel

func (b *BootstrapTester) Cancel() error

func (*BootstrapTester) CheckMocks

func (b *BootstrapTester) CheckMocks(t *testing.T)

func (*BootstrapTester) CheckoutDir

func (b *BootstrapTester) CheckoutDir() string

func (*BootstrapTester) Close

func (b *BootstrapTester) Close() error

Close the tester, delete all the directories and mocks

func (*BootstrapTester) ExpectGlobalHook

func (b *BootstrapTester) ExpectGlobalHook(name string) *bintest.Expectation

ExpectGlobalHook creates a mock object and a script in the global buildkite hooks dir that proxies to the mock. This lets you set up expectations on a global hook

func (*BootstrapTester) ExpectLocalHook

func (b *BootstrapTester) ExpectLocalHook(name string) *bintest.Expectation

ExpectLocalHook creates a mock object and a script in the git repository's buildkite hooks dir that proxies to the mock. This lets you set up expectations on a local hook

func (*BootstrapTester) HasMock

func (b *BootstrapTester) HasMock(name string) bool

HasMock returns true if a mock has been created by that name

func (*BootstrapTester) Mock

func (b *BootstrapTester) Mock(name string) (*bintest.Mock, error)

Mock creates a mock for a binary using bintest

func (*BootstrapTester) MustMock

func (b *BootstrapTester) MustMock(t *testing.T, name string) *bintest.Mock

MustMock will fail the test if creating the mock fails

func (*BootstrapTester) ReadEnvFromOutput

func (b *BootstrapTester) ReadEnvFromOutput(key string) (string, bool)

func (*BootstrapTester) Run

func (b *BootstrapTester) Run(t *testing.T, env ...string) error

Run the bootstrap and return any errors

func (*BootstrapTester) RunAndCheck

func (b *BootstrapTester) RunAndCheck(t *testing.T, env ...string)

Run the bootstrap and then check the mocks

Jump to

Keyboard shortcuts

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