mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-06-28 13:23:03 +02:00
adjust test code
This commit is contained in:
parent
603ea2db73
commit
ecaab0e048
|
@ -19,10 +19,10 @@ import (
|
||||||
const (
|
const (
|
||||||
maxPartSize = int64(5 * 1024 * 1024)
|
maxPartSize = int64(5 * 1024 * 1024)
|
||||||
maxRetries = 3
|
maxRetries = 3
|
||||||
awsAccessKeyID = "Your access key"
|
awsAccessKeyID = "any"
|
||||||
awsSecretAccessKey = "Your secret key"
|
awsSecretAccessKey = "any"
|
||||||
awsBucketRegion = "S3 bucket region"
|
awsBucketRegion = "us‑west‑1"
|
||||||
awsBucketName = "newBucket"
|
awsBucketName = "bucket1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -37,7 +37,7 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("bad credentials: %s", err)
|
fmt.Printf("bad credentials: %s", err)
|
||||||
}
|
}
|
||||||
cfg := aws.NewConfig().WithRegion(awsBucketRegion).WithCredentials(creds).WithDisableSSL(true).WithEndpoint("localhost:8333")
|
cfg := aws.NewConfig().WithRegion(awsBucketRegion).WithCredentials(creds).WithDisableSSL(true).WithEndpoint("localhost:8333").WithS3ForcePathStyle(true)
|
||||||
svc := s3.New(session.New(), cfg)
|
svc := s3.New(session.New(), cfg)
|
||||||
|
|
||||||
file, err := os.Open(*filename)
|
file, err := os.Open(*filename)
|
||||||
|
|
Loading…
Reference in a new issue