utils

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Bucket                   string
	FailoverBucket           string
	FailoverBucketDiffRegion string

	SidekickS3c *s3.Client
	AwsS3c      *s3.Client
	SidekickURL string
)

Functions

func AssertAwsClients added in v0.1.2

func AssertAwsClients[I any](
	t *testing.T,
	ctx context.Context,
	awsOp string,
	awsInput I,
	getRespValue func(t *testing.T, v reflect.Value) reflect.Value,
)

AssertAwsClients takes an aws operation name, an aws input, and a function to extract the response value from the aws response. This method will invoke the aws operation on both the aws client, the sidekick client, and the failover client and then compare the response values.

func GetAwsS3Client

func GetAwsS3Client(t *testing.T, ctx context.Context, region string) *s3.Client

GetAwsS3Client returns a default aws S3 client

func GetRegionForBucket added in v0.1.16

func GetRegionForBucket(t *testing.T, ctx context.Context, bucket string) string

func GetSidekickS3Client added in v0.1.2

func GetSidekickS3Client(t *testing.T, ctx context.Context, region string) *s3.Client

GetSidekickS3Client returns a S3 client connected to bolt through sidekick

func InitVariables

func InitVariables(t *testing.T, ctx context.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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