mirror of https://github.com/kubernetes/kops.git
mockec2: more missing locking
This commit is contained in:
parent
717eb4f6c5
commit
c8a8d72534
|
@ -27,6 +27,9 @@ import (
|
|||
)
|
||||
|
||||
func (m *MockEC2) DescribeDhcpOptions(request *ec2.DescribeDhcpOptionsInput) (*ec2.DescribeDhcpOptionsOutput, error) {
|
||||
m.mutex.Lock()
|
||||
defer m.mutex.Unlock()
|
||||
|
||||
glog.Infof("DescribeDhcpOptions: %v", request)
|
||||
|
||||
if request.DryRun != nil {
|
||||
|
|
|
@ -41,6 +41,9 @@ func (m *MockEC2) CreateTagsWithContext(aws.Context, *ec2.CreateTagsInput, ...re
|
|||
}
|
||||
|
||||
func (m *MockEC2) CreateTags(request *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error) {
|
||||
m.mutex.Lock()
|
||||
defer m.mutex.Unlock()
|
||||
|
||||
glog.Infof("CreateTags %v", request)
|
||||
|
||||
for _, v := range request.Resources {
|
||||
|
@ -156,6 +159,9 @@ func (m *MockEC2) getTags(resourceType string, resourceId string) []*ec2.Tag {
|
|||
}
|
||||
|
||||
func (m *MockEC2) DescribeTags(request *ec2.DescribeTagsInput) (*ec2.DescribeTagsOutput, error) {
|
||||
m.mutex.Lock()
|
||||
defer m.mutex.Unlock()
|
||||
|
||||
glog.Infof("DescribeTags %v", request)
|
||||
|
||||
var tags []*ec2.TagDescription
|
||||
|
|
|
@ -125,6 +125,9 @@ func (m *MockEC2) DescribeVolumesWithContext(aws.Context, *ec2.DescribeVolumesIn
|
|||
return nil, nil
|
||||
}
|
||||
func (m *MockEC2) DescribeVolumes(request *ec2.DescribeVolumesInput) (*ec2.DescribeVolumesOutput, error) {
|
||||
m.mutex.Lock()
|
||||
defer m.mutex.Unlock()
|
||||
|
||||
glog.Infof("DescribeVolumes: %v", request)
|
||||
|
||||
if request.VolumeIds != nil {
|
||||
|
|
Loading…
Reference in New Issue