Skip to content

Commit

Permalink
Merge pull request #57 from hairyhenderson/fix-tests
Browse files Browse the repository at this point in the history
Fixing broken tests
  • Loading branch information
hairyhenderson authored Sep 2, 2016
2 parents b3f1999 + 6184ae5 commit 1fb1dbb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions aws/ec2info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func TestTag_MissingKey(t *testing.T) {
server, ec2meta := MockServer(200, `"i-1234"`)
defer server.Close()
client := &DummyInstanceDescriber{
client := DummyInstanceDescriber{
tags: []*ec2.Tag{
&ec2.Tag{
Key: aws.String("foo"),
Expand All @@ -24,7 +24,9 @@ func TestTag_MissingKey(t *testing.T) {
},
}
e := &Ec2Info{
describer: client,
describer: func() InstanceDescriber {
return client
},
metaClient: ec2meta,
}

Expand All @@ -35,7 +37,7 @@ func TestTag_MissingKey(t *testing.T) {
func TestTag_ValidKey(t *testing.T) {
server, ec2meta := MockServer(200, `"i-1234"`)
defer server.Close()
client := &DummyInstanceDescriber{
client := DummyInstanceDescriber{
tags: []*ec2.Tag{
&ec2.Tag{
Key: aws.String("foo"),
Expand All @@ -48,7 +50,9 @@ func TestTag_ValidKey(t *testing.T) {
},
}
e := &Ec2Info{
describer: client,
describer: func() InstanceDescriber {
return client
},
metaClient: ec2meta,
}

Expand All @@ -61,7 +65,7 @@ type DummyInstanceDescriber struct {
tags []*ec2.Tag
}

func (d *DummyInstanceDescriber) DescribeInstances(*ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) {
func (d DummyInstanceDescriber) DescribeInstances(*ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) {
output := &ec2.DescribeInstancesOutput{
Reservations: []*ec2.Reservation{
&ec2.Reservation{
Expand Down

0 comments on commit 1fb1dbb

Please sign in to comment.