(t *testing.T, codec encoding.Codec)
| 245 | } |
| 246 | |
| 247 | func createClient(t *testing.T, codec encoding.Codec) oss.Client { |
| 248 | // os.Setenv("AWS_ACCESS_KEY_ID", "AKIAIOSFODNN7EXAMPLE") |
| 249 | /// os.Setenv("AWS_SECRET_ACCESS_KEY", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY") |
| 250 | options := oss.Options{ |
| 251 | BucketName: bucketname, |
| 252 | Region: endpoints.UsEast1RegionID, // endpoints.EuCentral1RegionID, |
| 253 | CustomEndpoint: customEndpoint, |
| 254 | UsePathStyleAddressing: true, |
| 255 | Codec: codec, |
| 256 | AWSaccessKeyID: accesskey, |
| 257 | AWSsecretAccessKey: secretkey, |
| 258 | } |
| 259 | client, err := oss.NewClient(options) |
| 260 | if err != nil { |
| 261 | t.Fatal(err) |
| 262 | } |
| 263 | return client |
| 264 | } |
| 265 | |
| 266 | //Thanks, from https://github.com/philippgille/gokv |
no test coverage detected