integration

package
Version: v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: MIT Imports: 14 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) 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL