testsuite

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostNamePropagationTest

type HostNamePropagationTest struct {
	Test
	Ingress        *workloads.Ingress
	Hostname       string
	ResponseBody   []byte
	ResponseStatus int
	Tracker        *TestTracker
}

func (*HostNamePropagationTest) Init

func (i *HostNamePropagationTest) Init(host string, useTLS bool)

Init prepares the test with initial conditions so that a starting point can be used to validate later

func (*HostNamePropagationTest) Run

func (i *HostNamePropagationTest) Run() error

Run the actual test

func (*HostNamePropagationTest) Validate

func (i *HostNamePropagationTest) Validate() error

Validate compares the end result of the test with the values set in the Init stage allowing a comparison to see if the test passed.

type ScalingTest

type ScalingTest struct {
	Test
	StartingNodes    int
	EndNodes         int
	StartingReplicas int32
	TargetReplicas   int32
	Deployment       *workloads.Deployment
	Tracker          *TestTracker
}

ScalingTest is used to validate the functionality of the autoscaler. TODO: This can be improved on using the following process

  • create resources
  • scale resources
  • check if new node exists
  • if not, check if any errors exist with regards to scaling
  • if not, scale again and repeat last two steps
  • if an error occurs - throw it back to the user
  • if a new node appears, it's successful

func NewScalingTest

func NewScalingTest(d *workloads.Deployment, c *helm.Client) *ScalingTest

NewScalingTest returns a new Scaling test which will check the cluster autoscaler works.

func (*ScalingTest) Init

func (c *ScalingTest) Init(targetReplicas int32)

Init prepares the test with initial conditions so that a starting point can be used to validate later

func (*ScalingTest) Run

func (c *ScalingTest) Run() error

Run the actual test

func (*ScalingTest) Validate

func (c *ScalingTest) Validate() error

Validate compares the end result of the test with the values set in the Init stage allowing a comparison to see if the test passed.

type Test

type Test struct {
	Client      *helm.Client
	Tracing     *tracing.Duration
	Name        string
	Description string
}

func NewTest

func NewTest(c *helm.Client, name, description string) Test

type TestCase

type TestCase interface {
	Init()
	Run() error
	Validate() error
}

type TestTracker

type TestTracker struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Completed   bool   `json:"completed,string"`
}

type VectorTest

type VectorTest struct {
	Test
	Pod     *workloads.Pod
	Logs    *rest.Request
	Tracker *TestTracker
}

func NewVectorTest

func NewVectorTest(p *workloads.Pod, c *helm.Client) *VectorTest

NewVectorTest allows the logs for the vector_add program to be checked to make sure it passed.

func (*VectorTest) Init

func (v *VectorTest) Init()

Init prepares the test with initial conditions so that a starting point can be used to validate later

func (*VectorTest) Run

func (v *VectorTest) Run() error

Run the actual test

func (*VectorTest) Validate

func (v *VectorTest) Validate() error

Validate compares the end result of the test with the values set in the Init stage allowing a comparison to see if the test passed. There is no metrics gathering here because by the time the logs are checked, the chart will have deployed and the test run already so those metrics are more relevant than any that could be gathered here.

Jump to

Keyboard shortcuts

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