Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidConfig is returned when the configuration is invalid. ErrInvalidConfig = errors.New("invalid config") )
var ( // Interval is used to send events in specific rate. Interval = 10 * time.Millisecond )
Functions ¶
func NewContinualVerification ¶ added in v0.24.0
func NewContinualVerification( name string, opts ContinualVerificationOptions, ) pkgupgrade.BackgroundOperation
NewContinualVerification will create a new continual verification operation that will verify that SUT is propagating events well through the test process. It's a general pattern that can be used to validate upgrade or performance testing.
Types ¶
type Config ¶
type Config struct { Wathola Interval time.Duration FinishedSleep time.Duration Serving ServingConfig FailOnErrors bool OnDuplicate DuplicateAction Ctx context.Context }
Config represents a configuration for prober.
func NewConfigOrFail ¶ added in v0.24.0
func NewConfigOrFail(c pkgupgrade.Context) *Config
NewConfigOrFail will create a prober.Config or fail trying.
type ConfigToml ¶ added in v0.24.0
type ConfigToml struct { // ConfigTemplate is a template file that will be compiled to the configmap ConfigTemplate string ConfigMapName string ConfigMountPoint string ConfigFilename string }
ConfigToml represents options of wathola config toml file.
type Configurator ¶ added in v0.24.0
Configurator will customize default config.
type ContinualVerificationOptions ¶ added in v0.24.0
type ContinualVerificationOptions struct { Configurators []Configurator ClientOptions []testlib.SetupClientOption }
ContinualVerificationOptions holds options for NewContinualVerification func.
type DuplicateAction ¶ added in v0.20.0
type DuplicateAction string
DuplicateAction is the action to take in case of duplicated events
const ( // Silence will suppress notification about event duplicates. Silence DuplicateAction = "silence" // Warn will issue a warning message in case of a event duplicate. Warn DuplicateAction = "warn" // Error will fail test with an error in case of event duplicate. Error DuplicateAction = "error" )
type ImageResolver ¶ added in v0.24.0
ImageResolver will resolve the container image for given component.
type Report ¶
type Report struct { State string `json:"state"` Events int `json:"events"` Thrown []string `json:"thrown"` }
Report represents a receiver JSON report
type Runner ¶ added in v0.24.0
type Runner interface { // Setup will start a continual prober in background. Setup(ctx pkgupgrade.Context) // Verify will verify that all sent events propagated at least once. Verify(ctx pkgupgrade.Context) }
Runner will run continual verification with provided configuration.
type ServingConfig ¶
ServingConfig represents a options for serving test component (wathola-forwarder).
type Wathola ¶ added in v0.19.0
type Wathola struct { ConfigToml ImageResolver SystemUnderTest sut.SystemUnderTest HealthEndpoint string }
Wathola represents options related strictly to wathola testing tool.