Use cleanhttp instead of bare http.Client

This commit is contained in:
Jeff Mitchell
2015-10-22 14:37:12 -04:00
parent 6c4e05dbc0
commit 5c0a16b16a
6 changed files with 17 additions and 14 deletions

View File

@@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"testing"
"time"
@@ -13,6 +12,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/vault/logical"
logicaltest "github.com/hashicorp/vault/logical/testing"
"github.com/mitchellh/mapstructure"
@@ -98,7 +98,7 @@ func testAccStepReadUser(t *testing.T, name string) logicaltest.TestStep {
awsConfig := &aws.Config{
Credentials: creds,
Region: aws.String("us-east-1"),
HTTPClient: &http.Client{},
HTTPClient: cleanhttp.DefaultClient(),
}
client := ec2.New(awsConfig)