summaryrefslogtreecommitdiff
path: root/aws
diff options
context:
space:
mode:
Diffstat (limited to 'aws')
-rw-r--r--aws/ec2meta.go4
-rw-r--r--aws/sts_test.go2
-rw-r--r--aws/testutils.go8
3 files changed, 10 insertions, 4 deletions
diff --git a/aws/ec2meta.go b/aws/ec2meta.go
index 72ee6f26..4165214c 100644
--- a/aws/ec2meta.go
+++ b/aws/ec2meta.go
@@ -22,11 +22,11 @@ const (
// Ec2Meta -
type Ec2Meta struct {
- Endpoint string
Client *http.Client
- nonAWS bool
cache map[string]string
+ Endpoint string
options ClientOptions
+ nonAWS bool
}
// NewEc2Meta -
diff --git a/aws/sts_test.go b/aws/sts_test.go
index df66288e..85bbeccd 100644
--- a/aws/sts_test.go
+++ b/aws/sts_test.go
@@ -88,8 +88,8 @@ func TestGetCallerIDErrors(t *testing.T) {
}
type DummyCallerIdentifier struct {
- account, arn, userID string
err error
+ account, arn, userID string
}
func (c *DummyCallerIdentifier) GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error) {
diff --git a/aws/testutils.go b/aws/testutils.go
index 8db7bb6c..9f4c0240 100644
--- a/aws/testutils.go
+++ b/aws/testutils.go
@@ -13,7 +13,13 @@ import (
func MockServer(code int, body string) (*httptest.Server, *Ec2Meta) {
server, httpClient := MockHTTPServer(code, body)
- client := &Ec2Meta{server.URL + "/", httpClient, false, make(map[string]string), ClientOptions{}}
+ client := &Ec2Meta{
+ Client: httpClient,
+ cache: make(map[string]string),
+ Endpoint: server.URL + "/",
+ options: ClientOptions{},
+ nonAWS: false,
+ }
return server, client
}