Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielZhangQD committed Dec 12, 2019
1 parent af988ed commit 87fd2dd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/storage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"io/ioutil"
"net/http"
"os"
"strings"
"time"

Expand Down Expand Up @@ -115,13 +116,8 @@ func getBackendOptionsFromS3Flags(flags *pflag.FlagSet) (options S3BackendOption
return
}
if send {
c := credentials.NewEnvCredentials()
v, cerr := c.Get()
if cerr != nil {
return options, errors.Trace(cerr)
}
options.AccessKey = v.AccessKeyID
options.SecretAccessKey = v.SecretAccessKey
options.AccessKey = os.Getenv("AWS_ACCESS_KEY_ID")
options.SecretAccessKey = os.Getenv("AWS_SECRET_ACCESS_KEY")
}
options.Endpoint, err = flags.GetString(s3EndpointOption)
if err != nil {
Expand Down

0 comments on commit 87fd2dd

Please sign in to comment.