feat: add list-buckets test for no buckets

We need to check to make sure list-buckets returns a correct
empty list when no buckets created.
This commit is contained in:
Ben McClelland
2024-11-18 21:35:19 -08:00
parent 3e9c5b883f
commit 568f8346bf
3 changed files with 36 additions and 0 deletions

View File

@@ -213,6 +213,21 @@ func actionHandler(s *S3Conf, testName string, handler func(s3client *s3.Client,
return handlerErr
}
func actionHandlerNoSetup(s *S3Conf, testName string, handler func(s3client *s3.Client, bucket string) error, _ ...setupOpt) error {
runF(testName)
client := s3.NewFromConfig(s.Config())
handlerErr := handler(client, "")
if handlerErr != nil {
failF("%v: %v", testName, handlerErr)
}
if handlerErr == nil {
passF(testName)
}
return handlerErr
}
type authConfig struct {
testName string
path string