bookinfo

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// BookInfo uses "bookinfo.yaml"
	BookInfo          bookInfoConfig = "bookinfo.yaml"
	BookinfoRatingsv2 bookInfoConfig = "bookinfo-ratings-v2.yaml"
	BookinfoDb        bookInfoConfig = "bookinfo-db.yaml"
)

Variables

This section is empty.

Functions

func Deploy

func Deploy(ctx resource.Context, cfg Config) (i deployment.Instance, err error)

DeployOrFail returns a new instance of deployed BookInfo or fails test

func DeployOrFail

func DeployOrFail(t *testing.T, ctx resource.Context, cfg Config) deployment.Instance

DeployOrFail returns a new instance of deployed BookInfo or fails test

Types

type Config

type Config struct {
	Namespace namespace.Instance
	Cfg       bookInfoConfig
}

type ConfigFile

type ConfigFile string

ConfigFile represents config yaml files for different bookinfo scenarios.

const (
	// NetworkingBookinfoGateway uses "networking/bookinfo-gateway.yaml"
	NetworkingBookinfoGateway ConfigFile = "networking/bookinfo-gateway.yaml"

	// NetworkingDestinationRuleAll uses "networking/destination-rule-all.yaml"
	NetworkingDestinationRuleAll ConfigFile = "networking/destination-rule-all.yaml"

	// NetworkingDestinationRuleAllMtls uses "networking/destination-rule-all-mtls.yaml"
	NetworkingDestinationRuleAllMtls ConfigFile = "networking/destination-rule-all-mtls.yaml"

	// NetworkingVirtualServiceAllV1 uses "networking/virtual-service-all-v1.yaml"
	NetworkingVirtualServiceAllV1 ConfigFile = "networking/virtual-service-all-v1.yaml"

	// NetworkingTcpDbRule uses "networking/virtual-service-ratings-db.yaml"
	NetworkingTCPDbRule ConfigFile = "networking/virtual-service-ratings-db.yaml"
)

func GetDestinationRuleConfigFile

func GetDestinationRuleConfigFile(t testing.TB, ctx resource.Context) ConfigFile

func (ConfigFile) LoadOrFail

func (l ConfigFile) LoadOrFail(t testing.TB) string

LoadOrFail loads a Book Info configuration file from the system and returns its contents.

func (ConfigFile) LoadOrFailGatewayFileWithNamespace

func (l ConfigFile) LoadOrFailGatewayFileWithNamespace(t testing.TB, namespace string) string

LoadOrFailGatewayFileWithNamespace loads a Book Info Gateway configuration file from the system, changes it to be fit for the namespace provided and returns its contents.

func (ConfigFile) LoadOrFailWithNamespace

func (l ConfigFile) LoadOrFailWithNamespace(t testing.TB, namespace string) string

LoadOrFailWithNamespace loads a Book Info configuration file from the systemchanges it to be fit for the namespace provided and returns its contents.

Jump to

Keyboard shortcuts

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