Skip to content

Commit

Permalink
awstesting/integration: Update integration tests for Shared Config
Browse files Browse the repository at this point in the history
  • Loading branch information
jasdel committed Jul 21, 2016
1 parent 23dd36b commit 0aec1ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func setup() {

// Delete the bucket
func teardown() {
svc := s3.New(session.New())
svc := s3.New(session.NewFromSharedConfig())

objs, _ := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName})
for _, o := range objs.Contents {
Expand Down Expand Up @@ -128,7 +128,7 @@ func TestUploadConcurrently(t *testing.T) {
}

func TestUploadFailCleanup(t *testing.T) {
svc := s3.New(session.New())
svc := s3.New(session.NewFromSharedConfig())

// Break checksum on 2nd part so it fails
part := 0
Expand All @@ -151,6 +151,7 @@ func TestUploadFailCleanup(t *testing.T) {
Body: bytes.NewReader(integBuf12MB),
})
assert.Error(t, err)
assert.NotContains(t, err.Error(), "MissingRegion")
uploadID := ""
if merr, ok := err.(s3manager.MultiUploadFailure); ok {
uploadID = merr.UploadID()
Expand Down
2 changes: 1 addition & 1 deletion awstesting/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

// Session is a shared session for all integration tests to use.
var Session = session.New()
var Session = session.NewFromSharedConfig()

func init() {
logLevel := Session.Config.LogLevel
Expand Down
2 changes: 1 addition & 1 deletion awstesting/integration/smoke/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

// Session is a shared session for all integration smoke tests to use.
var Session = session.New()
var Session = session.NewFromSharedConfig()

func init() {
logLevel := Session.Config.LogLevel
Expand Down

0 comments on commit 0aec1ed

Please sign in to comment.