test/builder/amazon/common/step_pre_validate: Update DescribeVpcs mock

* Update condition to check for a empty VpcId
This commit is contained in:
nywilken 2019-11-19 14:32:54 -05:00
parent 074be9942d
commit afb880c134
1 changed files with 1 additions and 4 deletions

View File

@ -11,11 +11,8 @@ import (
//DescribeVpcs mocks an ec2.DescribeVpcsOutput for a given input
func (m *mockEC2Conn) DescribeVpcs(input *ec2.DescribeVpcsInput) (*ec2.DescribeVpcsOutput, error) {
m.lock.Lock()
m.copyImageCount++
m.lock.Unlock()
if input == nil || len(input.VpcIds) == 0 {
if input == nil || aws.StringValue(input.VpcIds[0]) == "" {
return nil, fmt.Errorf("oops looks like we need more input")
}