test

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(tb testing.TB, condition bool, msg string, v ...interface{})

Assert fails the test if the condition is false.

func Equals

func Equals(tb testing.TB, exp, act interface{})

Equals fails the test if exp is not equal to act.

func Nok added in v1.9.0

func Nok(tb testing.TB, err error)

Nok fails the test if an err is nil.

func Ok

func Ok(tb testing.TB, err error)

Ok fails the test if an err is not nil.

func TimeWithinRange added in v1.17.0

func TimeWithinRange(tb testing.TB, act time.Time, lowerBound time.Time, upperBound time.Time)

TimeWithinRange fails the test if act is not after lowerBound or not before upperBound

Types

type MockedASG added in v1.9.0

type MockedASG struct {
	autoscalingiface.AutoScalingAPI
	CompleteLifecycleActionResp      autoscaling.CompleteLifecycleActionOutput
	CompleteLifecycleActionErr       error
	DescribeAutoScalingInstancesResp autoscaling.DescribeAutoScalingInstancesOutput
	DescribeAutoScalingInstancesErr  error
	DescribeTagsPagesResp            autoscaling.DescribeTagsOutput
	DescribeTagsPagesErr             error
}

MockedASG mocks the autoscaling API

func (MockedASG) CompleteLifecycleAction added in v1.9.0

CompleteLifecycleAction mocks the autoscaling.CompleteLifecycleAction API call

func (MockedASG) DescribeAutoScalingInstances added in v1.9.0

DescribeAutoScalingInstances mocks the autoscaling.DescribeAutoScalingInstances API call

func (MockedASG) DescribeTagsPages added in v1.9.0

func (m MockedASG) DescribeTagsPages(input *autoscaling.DescribeTagsInput, fn describeTagsPagesFn) error

DescribeTagsPages mocks the autoscaling.DescribeTagsPages API call

type MockedEC2 added in v1.9.0

type MockedEC2 struct {
	ec2iface.EC2API
	DescribeInstancesResp ec2.DescribeInstancesOutput
	DescribeInstancesErr  error
}

MockedEC2 mocks the EC2 API

func (MockedEC2) DescribeInstances added in v1.9.0

func (m MockedEC2) DescribeInstances(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)

DescribeInstances mocks the ec2.DescribeInstances API call

type MockedSQS added in v1.9.0

type MockedSQS struct {
	sqsiface.SQSAPI
	ReceiveMessageResp sqs.ReceiveMessageOutput
	ReceiveMessageErr  error
	DeleteMessageResp  sqs.DeleteMessageOutput
	DeleteMessageErr   error
}

MockedSQS mocks the SQS API

func (MockedSQS) DeleteMessage added in v1.9.0

func (m MockedSQS) DeleteMessage(input *sqs.DeleteMessageInput) (*sqs.DeleteMessageOutput, error)

DeleteMessage mocks the sqs.DeleteMessage API call

func (MockedSQS) ReceiveMessage added in v1.9.0

func (m MockedSQS) ReceiveMessage(input *sqs.ReceiveMessageInput) (*sqs.ReceiveMessageOutput, error)

ReceiveMessage mocks the sqs.ReceiveMessage API call

Jump to

Keyboard shortcuts

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