autoupdatelib

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package autoupdatelib provides common utils for making autoupdate tests.

Index

Constants

View Source
const (

	// TotalTestTime is the maximum time the test expected to take.
	TotalTestTime = cleanupTimeoutN2M + initTimeoutN2M + preUpdateTimeoutN2M + postUpdateTimeoutN2M + updateutil.UpdateTimeout
)

Variables

This section is empty.

Functions

func NToMTest

func NToMTest(ctx context.Context, s *testing.State, ops *Operations, deltaM int)

NToMTest drives autoupdate and calls to client code providing callbacks. deltaM parameter specifies amount of milestones to rollback.

Types

type Operations

type Operations struct {
	PreUpdate    func(ctx context.Context, s *testing.State)
	PostUpdate   func(ctx context.Context, s *testing.State)
	PostRollback func(ctx context.Context, s *testing.State)
	CleanUp      func(ctx context.Context, s *testing.State)
}

Operations contains operations performed at various points of update sequence. Each operation has timeout 3 minutes, except cleanup, which is 30 seconds.

Jump to

Keyboard shortcuts

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