helpers

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const AzureProfileStringTemplate = `` /* 970-byte string literal not displayed */

Variables

This section is empty.

Functions

func AddLoggingToTransport

func AddLoggingToTransport(rt http.RoundTripper) http.RoundTripper

func AzureProfileString

func AzureProfileString() string

func BuildBinaries

func BuildBinaries(outputDirectory string, debug bool) error

builds binaries

func BuildPushContainers

func BuildPushContainers(push, debug bool) error

builds and pushes all docker containers needed for test

func CertsDirectory

func CertsDirectory() string

func ClientCert

func ClientCert() string

func ClientKey

func ClientKey() string

func ConsulServiceAddress

func ConsulServiceAddress(service, tag string) (string, error)

uses default config

func Curl

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

func CurlEventuallyShouldRespond

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

func Exec

func Exec(name string, args ...string) (string, error)

func GlooSoloDirectory

func GlooSoloDirectory() string

func HelmDirectory

func HelmDirectory() string

func ImageTag

func ImageTag() string

func KubeE2eDirectory

func KubeE2eDirectory() string

func KubeLogs

func KubeLogs(pod string) string

func KubeResourcesDirectory added in v0.4.2

func KubeResourcesDirectory() 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 LocalE2eDirectory

func LocalE2eDirectory() string

func Must

func Must(err error)

func NewTestAttribute

func NewTestAttribute(name string) *v1.Attribute

func NewTestConfig

func NewTestConfig() *v1.Config

func NewTestRole

func NewTestRole(name string, vServices ...string) *v1.Role

func NewTestRoute1

func NewTestRoute1() *v1.Route

func NewTestRoute2

func NewTestRoute2() *v1.Route

func NewTestRouteWithCORS

func NewTestRouteWithCORS() *v1.Route

func NewTestSecrets

func NewTestSecrets() map[string]*dependencies.Secret

func NewTestUpstream1

func NewTestUpstream1() *v1.Upstream

func NewTestUpstream2

func NewTestUpstream2() *v1.Upstream

func NewTestVirtualService

func NewTestVirtualService(name string, routes ...*v1.Route) *v1.VirtualService

func NomadE2eDirectory

func NomadE2eDirectory() string

func RandString

func RandString(length int) string

func RegisterCommonFailHandlers

func RegisterCommonFailHandlers()

func RegisterPreFailHandler

func RegisterPreFailHandler(prefail func())

func ServerCert

func ServerCert() string

func ServerKey

func ServerKey() string

func SetupKubeForE2eTest

func SetupKubeForE2eTest(namespace string, buildImages, push, debug bool) error

func SetupKubeForTest

func SetupKubeForTest(namespace string) error

func SoloDirectory

func SoloDirectory() string

func TeardownKube

func TeardownKube(namespace string) error

func TeardownKubeE2E

func TeardownKubeE2E(namespace string) error

func TestRunner

func TestRunner(args ...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 ToMap

func ToMap(spec interface{}) (map[string]interface{}, error)

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 Clients added in v0.4.2

type Clients struct {
	Kube           kubernetes.Interface
	Gloo           storage.Interface
	RestConfig     *restclient.Config
	KubeconfigPath string
	MasterUrl      string
}

func GetClients added in v0.4.2

func GetClients(namespace string) Clients

type CurlOpts

type CurlOpts struct {
	Protocol string
	Path     string
	Method   string
	Host     string
	CaFile   string
	Body     string
	Headers  map[string]string
}

type MockResolver

type MockResolver struct {
	Result string
}

func (*MockResolver) Resolve

func (m *MockResolver) Resolve(us *v1.Upstream) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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