framework

package
v0.0.0-...-a1f2fe4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGlog

func InitGlog() error

InitGlog sets the logging directory. Should be called right after flag.Parse().

Types

type App

type App struct {
	AppYamlTemplate string
	AppYaml         string
	KubeInject      bool
	Template        interface{}
}

App gathers information for Hop app

type AppManager

type AppManager struct {
	Apps []*App
	// contains filtered or unexported fields
}

AppManager organize and deploy apps

func NewAppManager

func NewAppManager(tmpDir, namespace string, istioctl *Istioctl) *AppManager

NewAppManager create a new AppManager

func (*AppManager) AddApp

func (am *AppManager) AddApp(a *App)

AddApp for automated deployment. Must be done before Setup Call.

func (*AppManager) Setup

func (am *AppManager) Setup() error

Setup deploy apps

func (*AppManager) Teardown

func (am *AppManager) Teardown() error

Teardown currently does nothing, only to satisfied cleanable{}

type Cleanable

type Cleanable interface {
	Setup() error
	Teardown() error
}

Cleanable interfaces that need to be registered to CommonConfig

type CommonConfig

type CommonConfig struct {
	// Test Cleanup registration
	Cleanup *testCleanup
	// Test Information
	Info *testInfo
	// Kubernetes and istio installation information
	Kube *KubeInfo
}

CommonConfig regroup all common test configuration.

func NewCommonConfig

func NewCommonConfig(testID string) (*CommonConfig, error)

NewCommonConfig creates a full config will all supported configs.

func (*CommonConfig) RunTest

func (c *CommonConfig) RunTest(m runnable) int

RunTest sets up all registered cleanables in FIFO order Execute the runnable Call teardown on all the cleanables in LIFO order.

type Istioctl

type Istioctl struct {
	// contains filtered or unexported fields
}

Istioctl gathers istioctl information.

func NewIstioctl

func NewIstioctl(yamlDir, namespace, istioNamespace, proxyHub, proxyTag string) (*Istioctl, error)

NewIstioctl create a new istioctl by given temp dir.

func (*Istioctl) CreateRule

func (i *Istioctl) CreateRule(rule string) error

CreateRule create new rule(s)

func (*Istioctl) DeleteRule

func (i *Istioctl) DeleteRule(rule string) error

DeleteRule Delete rule(s)

func (*Istioctl) Install

func (i *Istioctl) Install() error

Install downloads Istioctl binary.

func (*Istioctl) KubeInject

func (i *Istioctl) KubeInject(src, dest string) error

KubeInject use istio kube-inject to create new yaml with a proxy as sidecar.

func (*Istioctl) ReplaceRule

func (i *Istioctl) ReplaceRule(rule string) error

ReplaceRule replace rule(s)

func (*Istioctl) Setup

func (i *Istioctl) Setup() error

Setup set up istioctl prerequest for tests, port forwarding

func (*Istioctl) Teardown

func (i *Istioctl) Teardown() error

Teardown clean up everything created by setup

type KubeInfo

type KubeInfo struct {
	Namespace string

	TmpDir string

	Ingress string

	AuthEnabled bool

	// Istioctl installation
	Istioctl *Istioctl
	// App Manager
	AppManager *AppManager
	// contains filtered or unexported fields
}

KubeInfo gathers information for kubectl

func (*KubeInfo) Setup

func (k *KubeInfo) Setup() error

Setup set up Kubernetes prerequest for tests

func (*KubeInfo) Teardown

func (k *KubeInfo) Teardown() error

Teardown clean up everything created by setup

Jump to

Keyboard shortcuts

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