(t *testing.T)
| 34 | } |
| 35 | |
| 36 | func TestManager_CreateBucket(t *testing.T) { |
| 37 | t.Parallel() |
| 38 | m := setupManager() |
| 39 | err := m.CreateBucket(context.Background(), "foo") |
| 40 | if err != nil { |
| 41 | if aerr, ok := err.(awserr.Error); ok { |
| 42 | switch aerr.Code() { |
| 43 | case s3.ErrCodeBucketAlreadyExists: |
| 44 | return |
| 45 | case s3.ErrCodeBucketAlreadyOwnedByYou: |
| 46 | return |
| 47 | default: |
| 48 | t.Fail() |
| 49 | } |
| 50 | } else { |
| 51 | t.Fail() |
| 52 | } |
| 53 | return |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | func TestManager_UploadFromUrl(t *testing.T) { |
| 58 | if os.Getenv("S3_ENDPOINT") == "" { |
nothing calls this directly
no test coverage detected