loadtest

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ApdexPassThreshold is the minimum value allowed for the test to pass.
	// Apdex (Application Performance Index) is an index that summarizes the
	// performance of a system under test. For more information see
	// https://en.wikipedia.org/wiki/Apdex#Apdex_method.
	ApdexPassThreshold      = 0.95
	AppChartName            = "loadtest-app-chart"
	CNRAddress              = "https://quay.io"
	CNROrganization         = "giantswarm"
	ChartChannel            = "stable"
	ChartNamespace          = "e2e-app"
	CustomResourceName      = "kubernetes-nginx-ingress-controller-chart"
	CustomResourceNamespace = "giantswarm"
	JobChartName            = "stormforger-cli-chart"
	TestName                = "aws-operator-e2e"
	UserConfigMapName       = "nginx-ingress-controller-user-values"
)

Variables

This section is empty.

Functions

func IsFailedLoadTest

func IsFailedLoadTest(err error) bool

IsFailedLoadTest asserts failedLoadTestError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsWait

func IsWait(err error) bool

IsWait asserts waitError.

Types

type Config

type Config struct {
	ApprClient   apprclient.Interface
	CPClients    *k8sclient.Clients
	CPHelmClient *helmclient.Client
	Logger       micrologger.Logger
	TCClients    *k8sclient.Clients
	TCHelmClient *helmclient.Client

	ClusterID            string
	CommonDomain         string
	StormForgerAuthToken string
}

type Interface

type Interface interface {
	// Test executes the loadtest test that checks that tenant cluster
	// components behave correctly under load. This primarily involves testing
	// the HPA configuration for Nginx Ingress Controller is correct and
	// interacts correctly with the cluster-autoscaler when it is enabled.
	//
	// The load test is performed by Stormforger. Their testapp is installed as
	// the test workload and a job is created to trigger the loadtest via their
	// CLI.
	//
	// https://github.com/stormforger/cli
	// https://github.com/stormforger/testapp
	//
	//     - Generate loadtest-app endpoint for the tenant cluster.
	//     - Wait for tenant cluster kubernetes API to be up.
	//     - Install loadtest-app chart in the tenant cluster.
	//     - Wait for loadtest-app deployment to be ready.
	//     - Enable HPA for Nginx Ingress Controller.
	//     - Install stormforger-cli chart.
	//     - Wait for stormforger-cli job to be completed.
	//     - Get logs for stormforger-cli pod with the results.
	//     - Parse the results and determine whether the test passed.
	//
	Test(ctx context.Context) error
}

type LoadTest

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

func New

func New(config Config) (*LoadTest, error)

func (*LoadTest) Test

func (l *LoadTest) Test(ctx context.Context) error

type LoadTestResults

type LoadTestResults struct {
	Data LoadTestResultsData `json:"data"`
}

LoadTestResults parses results from the Storm Forger API.

type LoadTestResultsData

type LoadTestResultsData struct {
	Attributes LoadTestResultsDataAttributes `json:"attributes"`
}

type LoadTestResultsDataAttributes

type LoadTestResultsDataAttributes struct {
	BasicStatistics LoadTestResultsDataAttributesBasicStatistics `json:"basic_statistics"`
}

type LoadTestResultsDataAttributesBasicStatistics

type LoadTestResultsDataAttributesBasicStatistics struct {
	Apdex75 float32 `json:"apdex_75"`
}

Jump to

Keyboard shortcuts

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