test

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EtcdSnapshotData = []byte("etcd snapshot data")

Functions

func EqualResource added in v1.2.0

func EqualResource(expected resource.Quantity) types2.GomegaMatcher

Types

type EtcdClientStub

type EtcdClientStub struct {
	StatusError     error
	SnapshotError   error
	AlarmError      error
	DisarmError     error
	StatusResponses map[string]*clientv3.StatusResponse
	ActiveAlarms    []*etcdserverpb.AlarmMember
}

func NewEtcdClientStub

func NewEtcdClientStub() *EtcdClientStub

func (*EtcdClientStub) CreateSnapshot

func (s *EtcdClientStub) CreateSnapshot(_ context.Context) (*clientv3.SnapshotResponse, error)

func (*EtcdClientStub) DisarmAlarm

func (s *EtcdClientStub) DisarmAlarm(_ context.Context, alarm *clientv3.AlarmMember) error

func (*EtcdClientStub) GetStatuses

func (s *EtcdClientStub) GetStatuses(_ context.Context) (map[string]*clientv3.StatusResponse, error)

func (*EtcdClientStub) ListAlarms

type S3ClientStub

type S3ClientStub struct {
	UploadError      error
	LastUploadedBody []byte
}

func NewS3ClientStub

func NewS3ClientStub() *S3ClientStub

func (*S3ClientStub) Upload

func (s *S3ClientStub) Upload(_ context.Context, body io.ReadCloser) (retErr error)

Jump to

Keyboard shortcuts

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