integration

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertDeleteNonexistentWorks

func AssertDeleteNonexistentWorks(s3CLIPath string, cfg *config.S3Cli)

AssertDeleteNonexistentWorks asserts that `s3cli delete` on a non-existent object exits with status 0 (tests idempotency)

func AssertGetNonexistentFails

func AssertGetNonexistentFails(s3CLIPath string, cfg *config.S3Cli)

AssertGetNonexistentFails asserts that `s3cli get` on a non-existent object will fail

func AssertLifecycleWorks

func AssertLifecycleWorks(s3CLIPath string, cfg *config.S3Cli)

AssertLifecycleWorks tests the main blobstore object lifecycle from creation to deletion

func AssertOnMultipartUploads

func AssertOnMultipartUploads(s3CLIPath string, cfg *config.S3Cli, content string)

func AssertOnPutFailures

func AssertOnPutFailures(s3CLIPath string, cfg *config.S3Cli, content, errorMessage string)

func AssertOnSignedURLs

func AssertOnSignedURLs(s3CLIPath string, cfg *config.S3Cli)

AssertOnSignedURLs asserts on using signed URLs for upload and download

func AssertPutOptionsApplied

func AssertPutOptionsApplied(s3CLIPath string, cfg *config.S3Cli)

AssertPutOptionsApplied asserts that `s3cli put` uploads files with the requested encryption options

func CreateS3ClientWithFailureInjection

func CreateS3ClientWithFailureInjection(s3Config *config.S3Cli) (*s3.Client, error)

CreateS3ClientWithFailureInjection creates an S3 client with failure injection middleware

func CreateS3ClientWithTracing

func CreateS3ClientWithTracing(baseClient *s3.Client, tracingMiddleware *S3TracingMiddleware) *s3.Client

CreateS3ClientWithTracing creates a new S3 client with tracing middleware

func CreateSHACorruptionMiddleware

func CreateSHACorruptionMiddleware() middleware.FinalizeMiddleware

CreateSHACorruptionMiddleware creates a Finalize middleware that corrupts headers

func CreateTracingS3Client

func CreateTracingS3Client(s3Config *config.S3Cli, calls *[]string) (*s3.Client, error)

CreateTracingS3Client creates an S3 client with tracing middleware from config

func CreateUploadPartTracker

func CreateUploadPartTracker() middleware.InitializeMiddleware

CreateUploadPartTracker creates an Initialize middleware that tracks upload parts

func GenerateRandomString

func GenerateRandomString(params ...int) string

GenerateRandomString generates a random string of desired length (default: 25)

func MakeConfigFile

func MakeConfigFile(cfg *config.S3Cli) string

MakeConfigFile creates a config file from a S3Cli config struct

func MakeContentFile

func MakeContentFile(content string) string

MakeContentFile creates a temporary file with content to upload to S3

func RunS3CLI

func RunS3CLI(cliPath string, configPath string, storageType string, subcommand string, args ...string) (*gexec.Session, error)

RunS3CLI runs the s3cli and outputs the session after waiting for it to finish

Types

type S3TracingMiddleware

type S3TracingMiddleware struct {
	// contains filtered or unexported fields
}

S3TracingMiddleware captures S3 operation names for testing

func CreateS3TracingMiddleware

func CreateS3TracingMiddleware(calls *[]string) *S3TracingMiddleware

CreateS3TracingMiddleware creates a middleware that tracks S3 operation calls

func (*S3TracingMiddleware) HandleInitialize

HandleInitialize implements the InitializeMiddleware interface

func (*S3TracingMiddleware) ID

func (m *S3TracingMiddleware) ID() string

ID returns the middleware identifier

Jump to

Keyboard shortcuts

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