Documentation ¶
Index ¶
- Variables
- func AccessPolicyTest()
- func ConflictDetectionTest()
- func DiscoveryTest()
- func FederateClusters(vm *networkingv1.VirtualMesh, timeoutMinutes int)
- func FederationTest()
- func InitializeTests() bool
- func NetworkingExtensionsTest()
- func SetupClustersAndFederation(customDeployFuc func())
- func TeardownFederationAndClusters()
- func TrafficPolicyTest()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VirtualMesh *networkingv1.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 = func() (*v1.ObjectRef, error) { var meshName string var out bytes.Buffer cmd := exec.Command("bash", "-c", "istioctl version") cmd.Stdout = &out err := cmd.Run() if err != nil { return nil, err } outputString := out.String() if strings.Contains(outputString, "1.7") { meshName = "istiod-istio-system-remote-cluster" } else { meshName = "istiod-rev-istio-system-remote-cluster" } return &v1.ObjectRef{ Name: meshName, Namespace: "gloo-mesh", }, nil } 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") } CurlUrl = func(url string) func() string { return func() string { return CurlFromProductpage(url) } } // Public to be used in enterprise 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 := CurlLocal(hostname, path, body, method, "32000") Expect(err).NotTo(HaveOccurred()) return out } CurlIngressMgmt = func(hostname, path, body, method string) (string, error) { return CurlLocal(hostname, path, body, method, "32011") } CurlIngressRemote = func(hostname, path, body, method string) (string, error) { return CurlLocal(hostname, path, body, method, "32010") } CurlLocal = func(hostname, path, body, method, port string) (string, error) { curlCmd := exec.Command("curl", "--connect-timeout", "1", "--max-time", "5", "-H", "Host: "+hostname, "http://localhost:"+port+path, "-v", "-d", body, "-X", method) out, err := curlCmd.CombinedOutput() if err == nil { GinkgoWriter.Write(out) } return string(out), err } )
Shared test vars
Functions ¶
func ConflictDetectionTest ¶ added in v1.1.0
func ConflictDetectionTest()
This test assumes conflict detection is enabled at Gloo Mesh boot time using the "--disallow-intersecting-config=true" CLI flag.
func FederateClusters ¶ added in v0.12.3
func FederateClusters(vm *networkingv1.VirtualMesh, timeoutMinutes int)
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.
Click to show internal directories.
Click to hide internal directories.