setup

package
v0.10.12 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateParallelPort added in v0.10.4

func AllocateParallelPort(basePort int) int

func Curl

func Curl(opts CurlOpts, namespace string) (string, error)

func CurlEventuallyShouldRespond

func CurlEventuallyShouldRespond(opts CurlOpts, namespace, substr string, ginkgoOffset int, timeout ...time.Duration)

func DeleteCrd

func DeleteCrd(crd string) error

func KubeLogs

func KubeLogs(pod string) string

func Kubectl

func Kubectl(args ...string) error

func KubectlOut

func KubectlOut(args ...string) (string, error)

func KubectlOutAsync

func KubectlOutAsync(args ...string) (*bytes.Buffer, chan struct{}, error)

func SetupKubeForTest deprecated

func SetupKubeForTest(namespace string) error

Deprecated: This function is slower than it's go client counterpart, and changes the kube context which can have unintended consequences

func TeardownKube deprecated

func TeardownKube(namespace string) error

Deprecated: This function is much slower than it's go client counterpart because it is blocking. If that is the intended behavior, go ahead and and use this function, but just no that it is quite slow.

func TestRunner

func TestRunner(namespace string, command ...string) (string, error)

TestRunner executes a command inside the TestRunner container

func TestRunnerAsync

func TestRunnerAsync(args ...string) (*bytes.Buffer, chan struct{}, error)

TestRunnerAsync executes a command inside the TestRunner container returning a buffer that can be read from as it executes

func WaitNamespaceStatus

func WaitNamespaceStatus(namespace, status string, finished func(output string) bool) error

func WaitPodStatus

func WaitPodStatus(pod, status string, finished func(output string) bool) error

func WaitPodsRunning

func WaitPodsRunning(podNames ...string) error

WaitPodsRunning waits for all pods to be running

func WaitPodsTerminated

func WaitPodsTerminated(podNames ...string) error

waitPodsTerminated waits for all pods to be terminated

Types

type ConsulFactory

type ConsulFactory struct {
	Ports ConsulPorts
	// contains filtered or unexported fields
}

func NewConsulFactory

func NewConsulFactory() (*ConsulFactory, error)

func (*ConsulFactory) Clean

func (ef *ConsulFactory) Clean() error

func (*ConsulFactory) NewConsulInstance

func (ef *ConsulFactory) NewConsulInstance() (*ConsulInstance, error)

type ConsulInstance

type ConsulInstance struct {
	Ports ConsulPorts
	// contains filtered or unexported fields
}

func (*ConsulInstance) Binary

func (i *ConsulInstance) Binary() string

func (*ConsulInstance) Clean

func (i *ConsulInstance) Clean() error

func (*ConsulInstance) Run

func (i *ConsulInstance) Run() error

func (*ConsulInstance) RunWithPort

func (i *ConsulInstance) RunWithPort() error

func (*ConsulInstance) Silence

func (i *ConsulInstance) Silence()

type ConsulPorts added in v0.10.4

type ConsulPorts struct {
	DnsPort, HttpPort, GrpcPort, ServerPort, SerfLanPort, SerfWanPort int
}

func NewRandomConsulPorts added in v0.10.4

func NewRandomConsulPorts() ConsulPorts

func (ConsulPorts) Flags added in v0.10.4

func (p ConsulPorts) Flags() []string

return flags to set each port type as a string

type CurlOpts

type CurlOpts struct {
	Protocol      string
	Path          string
	Method        string
	Host          string
	Service       string
	CaFile        string
	Body          string
	Headers       map[string]string
	Port          int
	ReturnHeaders bool
}

type VaultFactory

type VaultFactory struct {
	Port int
	// contains filtered or unexported fields
}

func NewVaultFactory

func NewVaultFactory() (*VaultFactory, error)

func (*VaultFactory) Clean

func (ef *VaultFactory) Clean() error

func (*VaultFactory) NewVaultInstance

func (ef *VaultFactory) NewVaultInstance() (*VaultInstance, error)

type VaultInstance

type VaultInstance struct {
	Port int
	// contains filtered or unexported fields
}

func (*VaultInstance) Binary

func (i *VaultInstance) Binary() string

func (*VaultInstance) Clean

func (i *VaultInstance) Clean() error

func (*VaultInstance) Exec

func (i *VaultInstance) Exec(args ...string) (string, error)

func (*VaultInstance) Run

func (i *VaultInstance) Run() error

func (*VaultInstance) RunWithPort

func (i *VaultInstance) RunWithPort() error

func (*VaultInstance) Token

func (i *VaultInstance) Token() string

Jump to

Keyboard shortcuts

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