tests

package
v1.0.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VirtualMesh         *networkingv1alpha2.VirtualMesh
	VirtualMeshManifest utils.Manifest
)
View Source
var (
	BookinfoNamespace = "bookinfo"

	MgmtClusterName   = "mgmt-cluster"
	RemoteClusterName = "remote-cluster"

	MgmtMesh = &v1.ObjectRef{
		Name:      "istiod-istio-system-mgmt-cluster",
		Namespace: "gloo-mesh",
	}

	RemoteMesh = &v1.ObjectRef{
		Name:      "istiod-istio-system-remote-cluster",
		Namespace: "gloo-mesh",
	}

	CurlReviews = func() string {
		return CurlFromProductpage("http://reviews:9080/reviews/1")
	}

	CurlHelloServer = func() string {
		return CurlFromProductpage(fmt.Sprintf("http://%v:%v/", extensions.HelloServerHostname, extensions.HelloServerPort))
	}

	CurlRemoteReviews = func(federatedSuffix string) func() string {
		return func() string {
			return CurlFromProductpage(fmt.Sprintf("http://reviews.%v.svc.%v.%s:9080/reviews/1", BookinfoNamespace, RemoteClusterName, federatedSuffix))
		}
	}

	CurlRatings = func() string {
		return CurlFromProductpage("http://ratings:9080/ratings/1")
	}

	CurlFromProductpage = func(url string) string {
		env := e2e.GetEnv()
		ctx, cancel := context.WithTimeout(context.Background(), time.Minute/2)
		defer cancel()
		out := env.Management.GetPod(ctx, BookinfoNamespace, "productpage").Curl(ctx, url, "-v")
		GinkgoWriter.Write([]byte(out))
		return out
	}

	CurlGateway = func(hostname, path, body, method string) string {
		out, err := exec.Command("curl", "--connect-timeout", "1", "--max-time", "5", "-H", hostname, "http://localhost:32000"+path, "-v", "-d", body, "-X", method).CombinedOutput()
		Expect(err).NotTo(HaveOccurred())

		GinkgoWriter.Write(out)

		return string(out)
	}
)

Shared test vars

Functions

func AccessPolicyTest

func AccessPolicyTest()

run tests for AccessPolicy CRD functionality

func DiscoveryRegressionTest added in v0.12.3

func DiscoveryRegressionTest()

run Enterprise Discovery regression tests

func FailoverServiceTest

func FailoverServiceTest()

func FederateClusters added in v0.12.3

func FederateClusters(dynamicClient client.Client, flatNetwork bool)

exported for use in enterprise

func FederationTest

func FederationTest()

func InitializeTests

func InitializeTests() bool

initialize all tests in suite should be called from init() function or top level var

func NetworkingExtensionsTest

func NetworkingExtensionsTest()

func SetupClustersAndFederation

func SetupClustersAndFederation(customDeployFuc func())

Before running tests, federate the two clusters by creating a VirtualMesh with mTLS enabled.

func TeardownFederationAndClusters

func TeardownFederationAndClusters()

func TrafficPolicyTest

func TrafficPolicyTest()

Types

This section is empty.

Jump to

Keyboard shortcuts

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