Commit f8e6098e authored by Justin Santa Barbara's avatar Justin Santa Barbara

AWS: Update tests for refactoring

parent af9efa02
...@@ -928,12 +928,16 @@ type awsInstance struct { ...@@ -928,12 +928,16 @@ type awsInstance struct {
} }
// newAWSInstance creates a new awsInstance object // newAWSInstance creates a new awsInstance object
func newAWSInstance(ec2 EC2, instance *ec2.Instance) *awsInstance { func newAWSInstance(ec2Service EC2, instance *ec2.Instance) *awsInstance {
az := ""
if instance.Placement != nil {
az = aws.StringValue(instance.Placement.AvailabilityZone)
}
self := &awsInstance{ self := &awsInstance{
ec2: ec2, ec2: ec2Service,
awsID: aws.StringValue(instance.InstanceId), awsID: aws.StringValue(instance.InstanceId),
nodeName: aws.StringValue(instance.PrivateDnsName), nodeName: aws.StringValue(instance.PrivateDnsName),
availabilityZone: aws.StringValue(instance.Placement.AvailabilityZone), availabilityZone: az,
instanceType: aws.StringValue(instance.InstanceType), instanceType: aws.StringValue(instance.InstanceType),
vpcID: aws.StringValue(instance.VpcId), vpcID: aws.StringValue(instance.VpcId),
subnetID: aws.StringValue(instance.SubnetId), subnetID: aws.StringValue(instance.SubnetId),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment