kstepgen

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ScalingTestStep = iota
	KillPodTestStep
	SleepTestStep
	LastTestStep  = SleepTestStep
	FirstTestStep = ScalingTestStep
)

Variables

View Source
var DefaultTestStepWeight = []int{1, 2, 5}
View Source
var KillPodTemplate = `` /* 161-byte string literal not displayed */
View Source
var KuttlAssertTemplate = `` /* 436-byte string literal not displayed */
View Source
var SleepTemplate = `
apiVersion: kuttl.dev/v1beta1
kind: TestStep
timeout: {{ .Timeout }}
commands:
  - command: sleep {{ .SleepTime }}
`
View Source
var SteadyStateTemplate = `` /* 198-byte string literal not displayed */
View Source
var VerticaCRDTemplate = `` /* 224-byte string literal not displayed */

Functions

func CreateKillPodTestStep

func CreateKillPodTestStep(wr io.Writer, opts *Options) (err error)

CreateKillPodTestStep will generate a kuttl test step for killing a random number of pods

func CreateScalingTestStep

func CreateScalingTestStep(stepWriter, assertWriter io.Writer, opts *Options) (err error)

CreateScalingTestStep will generate kuttl test step for random scaling

func CreateSleepTestStep

func CreateSleepTestStep(wr io.Writer, opts *Options) (err error)

CreateSleepTestStep will generate a kuttl test step for sleeping a random amount of time

func CreateSteadyStateStep

func CreateSteadyStateStep(wr io.Writer, opts *Options) (err error)

CreateSleepTestStep will generate a kuttl test step for sleeping a random amount of time

Types

type Iteration

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

func MakeIteration

func MakeIteration(opts *Options) Iteration

func (*Iteration) CreateIteration

func (it *Iteration) CreateIteration() error

type Options

type Options struct {
	OutputDir      string
	StepCount      int
	StepTypeWeight []int

	ScriptDir     string
	MinPodsToKill int
	MaxPodsToKill int

	MinSleepTime int
	MaxSleepTime int

	MinSubclusters int
	MaxSubclusters int
	MinPods        int
	MaxPods        int

	Name      string
	Namespace string

	SteadyStateTimeout int
}

Options contains parameters to influence the behavior of the kuttl step generation

func MakeDefaultOptions

func MakeDefaultOptions() *Options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳