common

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 12 Imported by: 9

Documentation

Overview

package common contains common functions and values that are used across multiple e2e tests.

Index

Constants

View Source
const (
	// netObsRGtag is used to tag resources created by this test suite
	NetObsRGtag            = "-e2e-netobs-"
	KubeSystemNamespace    = "kube-system"
	TestPodNamespace       = "kube-system-test"
	AzureAppInsightsKeyEnv = "AZURE_APP_INSIGHTS_KEY"
	OutputFilePathEnv      = "OUTPUT_FILEPATH"
)

Variables

View Source
var (
	AzureLocations = []string{"eastus2", "northeurope", "uksouth", "centralindia", "westus2"}
	Architectures  = []string{"amd64", "arm64"}
	CreateInfra    = flag.Bool("create-infra", true, "create a Resource group, vNET and AKS cluster for testing")
	DeleteInfra    = flag.Bool("delete-infra", true, "delete a Resource group, vNET and AKS cluster for testing")
	ScaleTestInfra = ScaleTestInfraHandler{
					// contains filtered or unexported fields
	}

	// kubeconfig: path to kubeconfig file, in not provided,
	// a new k8s cluster will be created
	KubeConfig = flag.String("kubeConfig", "", "Path to kubeconfig file")
)
View Source
var (
	RetinaChartPath = func(rootDir string) string {
		return filepath.Join(rootDir, "deploy", "standard", "manifests", "controller", "helm", "retina")
	}
	HubbleChartPath = func(rootDir string) string {
		return filepath.Join(rootDir, "deploy", "hubble", "manifests", "controller", "helm", "retina")
	}
	RetinaAdvancedProfilePath = func(rootDir string) string {
		return filepath.Join(rootDir, "test", "profiles", "advanced", "values.yaml")
	}
	KubeConfigFilePath = func(rootDir string) string {
		return filepath.Join(rootDir, "test", "e2e", "test.pem")
	}
)
View Source
var ErrMetricFound = errors.New("unexpected metric found")

Functions

func ClusterNameForE2ETest added in v0.0.19

func ClusterNameForE2ETest(t *testing.T) string

Types

type ScaleTestInfraHandler added in v0.0.26

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

func (ScaleTestInfraHandler) GetClusterName added in v0.0.26

func (s ScaleTestInfraHandler) GetClusterName() string

func (ScaleTestInfraHandler) GetLocation added in v0.0.26

func (s ScaleTestInfraHandler) GetLocation() string

func (ScaleTestInfraHandler) GetNodes added in v0.0.26

func (s ScaleTestInfraHandler) GetNodes() string

func (ScaleTestInfraHandler) GetResourceGroup added in v0.0.26

func (s ScaleTestInfraHandler) GetResourceGroup() string

func (ScaleTestInfraHandler) GetSubscriptionID added in v0.0.26

func (s ScaleTestInfraHandler) GetSubscriptionID() string

type ValidateMetric added in v1.0.3

type ValidateMetric struct {
	ForwardedPort string
	MetricName    string
	ValidMetrics  []map[string]string
	ExpectMetric  bool
	PartialMatch  bool // If true, only the specified labels need to match (metric can have additional labels)
}

func (*ValidateMetric) Prevalidate added in v1.0.3

func (v *ValidateMetric) Prevalidate() error

func (*ValidateMetric) Run added in v1.0.3

func (v *ValidateMetric) Run() error

func (*ValidateMetric) Stop added in v1.0.3

func (v *ValidateMetric) Stop() error

Jump to

Keyboard shortcuts

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