Skip to content

Commit

Permalink
Merge branch 'master' into canonical-uri-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pxi committed Oct 1, 2014
2 parents f9ce041 + 8226812 commit fa61ef8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func serviceAndRegion(host string) (service string, region string) {
}
}

if region == "external-1" {
region = "us-east-1"
}

return
}

Expand Down
7 changes: 6 additions & 1 deletion common_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package awsauth

import (
. "github.com/smartystreets/goconvey/convey"
"testing"

. "github.com/smartystreets/goconvey/convey"
)

func TestCommonFunctions(t *testing.T) {
Expand Down Expand Up @@ -30,6 +31,10 @@ func TestCommonFunctions(t *testing.T) {
service, region = serviceAndRegion("s3-us-west-1.amazonaws.com")
So(service, ShouldEqual, "s3")
So(region, ShouldEqual, "us-west-1")

service, region = serviceAndRegion("s3-external-1.amazonaws.com")
So(service, ShouldEqual, "s3")
So(region, ShouldEqual, "us-east-1")
})

Convey("MD5 hashes should be properly computed and base-64 encoded", t, func() {
Expand Down

0 comments on commit fa61ef8

Please sign in to comment.