builder/amazon/common: remove dead test type and function mockEC2Conn_Modify_EBS.ModifyInstanceAttribute()

This commit is contained in:
Lars Lehtonen 2019-10-31 12:38:32 -07:00
parent 953be1603b
commit d072079899
No known key found for this signature in database
GPG Key ID: 8137D474EBCB04F2
1 changed files with 0 additions and 29 deletions

View File

@ -1,29 +0,0 @@
package common
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
)
// Define a mock struct to be used in unit tests for common aws steps.
type mockEC2Conn_ModifyEBS struct {
ec2iface.EC2API
Config *aws.Config
// Counters to figure out what code path was taken
shouldError bool
modifyImageAttrCount int
}
func (m *mockEC2Conn_ModifyEBS) ModifyInstanceAttribute(modifyInput *ec2.ModifyInstanceAttributeInput) (*ec2.ModifyInstanceAttributeOutput, error) {
m.modifyImageAttrCount++
// don't need to define output since we always discard it anyway.
output := &ec2.ModifyInstanceAttributeOutput{}
if m.shouldError {
return output, fmt.Errorf("fake ModifyInstanceAttribute error")
}
return output, nil
}