utils

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppmeshBookInfoYaml = bookinfoYaml + appmeshServices
)
View Source
const TestRunnerYaml = `` /* 981-byte string literal not displayed */

Variables

View Source
var IstioBookInfoYaml = func() string {
	bookinfoYamlFile := MustTestFile("bookinfo.yaml")
	b, err := ioutil.ReadFile(bookinfoYamlFile)
	if err != nil {
		log.Fatalf("failed to read bookinfo for test: %v", err)
	}
	return string(b)
}()

loads bookinfo from <root>/test/e2e/files/bookinfo.yaml

View Source
var TestServiceYaml = func() string {
	file := MustTestFile("test-service.yaml")
	b, err := ioutil.ReadFile(file)
	if err != nil {
		log.Fatalf("failed to read file for test: %v", err)
	}
	return string(b)
}()

loads test-service from <root>/test/e2e/files/test-service.yaml

Functions

func ConfigMap added in v0.3.8

func ConfigMap(ns, name, data string, labels map[string]string) kubev1.ConfigMap

func CreateConfigMap added in v0.3.8

func CreateConfigMap(cm kubev1.ConfigMap) error

func CreateNs added in v0.3.8

func CreateNs(ns string) error

func CurlArgs

func CurlArgs(opts setup.CurlOpts) []string

func DeleteNs added in v0.3.8

func DeleteNs(ns string) error

func DeployBookInfoAppmesh added in v0.3.8

func DeployBookInfoAppmesh(namespace string) error

func DeployBookInfoIstio added in v0.3.8

func DeployBookInfoIstio(namespace string) error

func DeployBookInfoWithInject

func DeployBookInfoWithInject(namespace, istioNamespace string) error

func DeployPrometheus added in v0.3.13

func DeployPrometheus(kube kubernetes.Interface, namespace string) error

func DeployTestRunner

func DeployTestRunner(namespace string) error

func DeployTestRunnerWithIstioInject added in v0.3.12

func DeployTestRunnerWithIstioInject(namespace, istioNamespace string) error

func DeployTestRunnerWithLinkerdInject added in v0.3.12

func DeployTestRunnerWithLinkerdInject(namespace string) error

func DeployTestService added in v0.3.12

func DeployTestService(namespace string) error

func HelmTemplate added in v0.3.13

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

func IstioInject

func IstioInject(istioNamespace, input string) (string, error)

func Kubectl

func Kubectl(stdin io.Reader, args ...string) error

func KubectlApply

func KubectlApply(namespace, yamlStr string) error

func KubectlCtx

func KubectlCtx(ctx context.Context, stdin io.Reader, args ...string) error

func KubectlDelete

func KubectlDelete(namespace, yamlStr string) error

func KubectlPortForward

func KubectlPortForward(ctx context.Context, namespace, deployment string, port int) error

func LinkerdInject added in v0.3.12

func LinkerdInject(input string) (string, error)

func MustCreateConfigMap added in v0.3.8

func MustCreateConfigMap(cm kubev1.ConfigMap)

func MustCreateNs added in v0.3.8

func MustCreateNs(ns string)

func MustDeleteNs added in v0.3.8

func MustDeleteNs(ns string)

func MustProjectRoot added in v0.3.8

func MustProjectRoot() string

func MustTestFile added in v0.3.8

func MustTestFile(filename string) string

func MustTestFiles added in v0.3.8

func MustTestFiles() string

func PodExec added in v0.3.12

func PodExec(podLabels map[string]string, namespace string, command ...string) (string, error)

TestRunner executes a command inside the TestRunner container

func ProjectRoot added in v0.3.8

func ProjectRoot() (string, error)

returns absolute path of project root

func TeardownPrometheus added in v0.3.13

func TeardownPrometheus(kube kubernetes.Interface, namespace string) error

func TestRunnerCurl

func TestRunnerCurl(namespace string, opts setup.CurlOpts) (string, error)

func TestRunnerCurlEventuallyShouldRespond

func TestRunnerCurlEventuallyShouldRespond(ctx context.Context, testrunnerNamespace string, opts setup.CurlOpts, substr string, timeout time.Duration)

Types

This section is empty.

Jump to

Keyboard shortcuts

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