Merge pull request #7215 from hashicorp/revert-wrong-push

Revert commit b8b3e64cff & 993af36f2e
This commit is contained in:
Adrien Delorme 2019-01-18 12:41:49 +01:00 committed by GitHub
commit 4fef738363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 13 deletions

View File

@ -15,7 +15,7 @@ import (
"github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ec2/ec2iface" "github.com/aws/aws-sdk-go/service/ec2/ec2iface"
cleanhttp "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/packer/template/interpolate" "github.com/hashicorp/packer/template/interpolate"
) )
@ -52,7 +52,7 @@ func (c *AccessConfig) Session() (*session.Session, error) {
// default is 3, and when it was causing failures for users being throttled // default is 3, and when it was causing failures for users being throttled
// retries are exponentially backed off. // retries are exponentially backed off.
config = config.WithMaxRetries(20) config = config.WithMaxRetries(8)
region, err := c.region() region, err := c.region()
if err != nil { if err != nil {

View File

@ -68,14 +68,3 @@ func TestAccessConfigPrepare_RegionRestricted(t *testing.T) {
t.Fatal("We should be in gov region.") t.Fatal("We should be in gov region.")
} }
} }
func TestAccessConfig_NoCredentialsFailsQuickly(t *testing.T) {
c := &AccessConfig{
RawRegion: "not-empty",
}
_, err := c.Session()
if err == nil {
t.Errorf("AccessConfig.Session() error is nil")
return
}
}