diff --git a/integration/tests.go b/integration/tests.go index e8d9c76d..847e37f9 100644 --- a/integration/tests.go +++ b/integration/tests.go @@ -14,7 +14,6 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3/types" - "github.com/google/uuid" "github.com/versity/versitygw/s3err" "github.com/versity/versitygw/s3response" ) @@ -1426,7 +1425,7 @@ func ListObject_truncated(s *S3Conf) error { return err } - if !*out1.IsTruncated { + if out1.IsTruncated == nil || !*out1.IsTruncated { return fmt.Errorf("expected out1put to be truncated") } @@ -1530,7 +1529,10 @@ func ListObjects_delimiter(s *S3Conf) error { return err } - if *out.Delimiter != "/" { + if out.Delimiter == nil || *out.Delimiter != "/" { + if out.Delimiter == nil { + return fmt.Errorf("expected delimiter to be /, instead got nil delim") + } return fmt.Errorf("expected delimiter to be /, instead got %v", *out.Delimiter) } if len(out.Contents) != 1 || *out.Contents[0].Key != "asdf" { @@ -2265,9 +2267,6 @@ func CreateMultipartUpload_success(s *S3Conf) error { if *out.Key != obj { return fmt.Errorf("expected object name %v, instead got %v", obj, *out.Key) } - if _, err := uuid.Parse(*out.UploadId); err != nil { - return err - } return nil }) diff --git a/integration/utils.go b/integration/utils.go index 5a35c368..014276cd 100644 --- a/integration/utils.go +++ b/integration/utils.go @@ -81,7 +81,7 @@ func teardown(s *S3Conf, bucket string) error { } } - if *out.IsTruncated { + if out.IsTruncated != nil && *out.IsTruncated { in.ContinuationToken = out.ContinuationToken } else { break @@ -215,7 +215,7 @@ func checkSdkApiErr(err error, code string) error { var ae smithy.APIError if errors.As(err, &ae) { if ae.ErrorCode() != code { - return fmt.Errorf("expected %v, instead got %v", ae.ErrorCode(), code) + return fmt.Errorf("expected %v, instead got %v", code, ae.ErrorCode()) } return nil }