diff --git a/pkg/cloud/cloud.go b/pkg/cloud/cloud.go index f304d1542f..b20c5f2719 100644 --- a/pkg/cloud/cloud.go +++ b/pkg/cloud/cloud.go @@ -745,7 +745,7 @@ func (c *cloud) ResizeDisk(ctx context.Context, volumeID string, reqSizeBytes in m, err2 := c.getVolumeModification(ctx, volumeID) if err2 != nil { // TODO: return which error? - return -1, fmt.Errorf("could not get modificationvstate of volume %q: olumevolum ID, emo2dification %v", err) + return -1, fmt.Errorf("could not get modificationvstate of volume %q: olumevolum ID, emo2dification %v", volumeID, err) } // Check for idempotency diff --git a/pkg/cloud/mocks/mock_ec2.go b/pkg/cloud/mocks/mock_ec2.go index d893d813e5..a9bf45ab88 100644 --- a/pkg/cloud/mocks/mock_ec2.go +++ b/pkg/cloud/mocks/mock_ec2.go @@ -1,6 +1,7 @@ -// Automatically generated by MockGen. DO NOT EDIT! +// Code generated by MockGen. DO NOT EDIT. // Source: github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud (interfaces: EC2) +// Package mocks is a generated GoMock package. package mocks import ( @@ -8,169 +9,248 @@ import ( request "github.com/aws/aws-sdk-go/aws/request" ec2 "github.com/aws/aws-sdk-go/service/ec2" gomock "github.com/golang/mock/gomock" + reflect "reflect" ) -// Mock of EC2 interface +// MockEC2 is a mock of EC2 interface type MockEC2 struct { ctrl *gomock.Controller - recorder *_MockEC2Recorder + recorder *MockEC2MockRecorder } -// Recorder for MockEC2 (not exported) -type _MockEC2Recorder struct { +// MockEC2MockRecorder is the mock recorder for MockEC2 +type MockEC2MockRecorder struct { mock *MockEC2 } +// NewMockEC2 creates a new mock instance func NewMockEC2(ctrl *gomock.Controller) *MockEC2 { mock := &MockEC2{ctrl: ctrl} - mock.recorder = &_MockEC2Recorder{mock} + mock.recorder = &MockEC2MockRecorder{mock} return mock } -func (_m *MockEC2) EXPECT() *_MockEC2Recorder { - return _m.recorder +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockEC2) EXPECT() *MockEC2MockRecorder { + return m.recorder } -func (_m *MockEC2) AttachVolumeWithContext(_param0 aws.Context, _param1 *ec2.AttachVolumeInput, _param2 ...request.Option) (*ec2.VolumeAttachment, error) { - _s := []interface{}{_param0, _param1} - for _, _x := range _param2 { - _s = append(_s, _x) +// AttachVolumeWithContext mocks base method +func (m *MockEC2) AttachVolumeWithContext(arg0 aws.Context, arg1 *ec2.AttachVolumeInput, arg2 ...request.Option) (*ec2.VolumeAttachment, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "AttachVolumeWithContext", _s...) + ret := m.ctrl.Call(m, "AttachVolumeWithContext", varargs...) ret0, _ := ret[0].(*ec2.VolumeAttachment) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) AttachVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - _s := append([]interface{}{arg0, arg1}, arg2...) - return _mr.mock.ctrl.RecordCall(_mr.mock, "AttachVolumeWithContext", _s...) +// AttachVolumeWithContext indicates an expected call of AttachVolumeWithContext +func (mr *MockEC2MockRecorder) AttachVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachVolumeWithContext", reflect.TypeOf((*MockEC2)(nil).AttachVolumeWithContext), varargs...) +} + +// CreateSnapshotWithContext mocks base method +func (m *MockEC2) CreateSnapshotWithContext(arg0 aws.Context, arg1 *ec2.CreateSnapshotInput, arg2 ...request.Option) (*ec2.Snapshot, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateSnapshotWithContext", varargs...) + ret0, _ := ret[0].(*ec2.Snapshot) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateSnapshotWithContext indicates an expected call of CreateSnapshotWithContext +func (mr *MockEC2MockRecorder) CreateSnapshotWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSnapshotWithContext", reflect.TypeOf((*MockEC2)(nil).CreateSnapshotWithContext), varargs...) } -func (_m *MockEC2) CreateVolumeWithContext(_param0 aws.Context, _param1 *ec2.CreateVolumeInput, _param2 ...request.Option) (*ec2.Volume, error) { - _s := []interface{}{_param0, _param1} - for _, _x := range _param2 { - _s = append(_s, _x) +// CreateVolumeWithContext mocks base method +func (m *MockEC2) CreateVolumeWithContext(arg0 aws.Context, arg1 *ec2.CreateVolumeInput, arg2 ...request.Option) (*ec2.Volume, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "CreateVolumeWithContext", _s...) + ret := m.ctrl.Call(m, "CreateVolumeWithContext", varargs...) ret0, _ := ret[0].(*ec2.Volume) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) CreateVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - _s := append([]interface{}{arg0, arg1}, arg2...) - return _mr.mock.ctrl.RecordCall(_mr.mock, "CreateVolumeWithContext", _s...) +// CreateVolumeWithContext indicates an expected call of CreateVolumeWithContext +func (mr *MockEC2MockRecorder) CreateVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolumeWithContext", reflect.TypeOf((*MockEC2)(nil).CreateVolumeWithContext), varargs...) +} + +// DeleteSnapshotWithContext mocks base method +func (m *MockEC2) DeleteSnapshotWithContext(arg0 aws.Context, arg1 *ec2.DeleteSnapshotInput, arg2 ...request.Option) (*ec2.DeleteSnapshotOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteSnapshotWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DeleteSnapshotOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteSnapshotWithContext indicates an expected call of DeleteSnapshotWithContext +func (mr *MockEC2MockRecorder) DeleteSnapshotWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSnapshotWithContext", reflect.TypeOf((*MockEC2)(nil).DeleteSnapshotWithContext), varargs...) } -func (_m *MockEC2) DeleteVolumeWithContext(_param0 aws.Context, _param1 *ec2.DeleteVolumeInput, _param2 ...request.Option) (*ec2.DeleteVolumeOutput, error) { - _s := []interface{}{_param0, _param1} - for _, _x := range _param2 { - _s = append(_s, _x) +// DeleteVolumeWithContext mocks base method +func (m *MockEC2) DeleteVolumeWithContext(arg0 aws.Context, arg1 *ec2.DeleteVolumeInput, arg2 ...request.Option) (*ec2.DeleteVolumeOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "DeleteVolumeWithContext", _s...) + ret := m.ctrl.Call(m, "DeleteVolumeWithContext", varargs...) ret0, _ := ret[0].(*ec2.DeleteVolumeOutput) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) DeleteVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - _s := append([]interface{}{arg0, arg1}, arg2...) - return _mr.mock.ctrl.RecordCall(_mr.mock, "DeleteVolumeWithContext", _s...) +// DeleteVolumeWithContext indicates an expected call of DeleteVolumeWithContext +func (mr *MockEC2MockRecorder) DeleteVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolumeWithContext", reflect.TypeOf((*MockEC2)(nil).DeleteVolumeWithContext), varargs...) } -func (_m *MockEC2) DescribeInstancesWithContext(_param0 aws.Context, _param1 *ec2.DescribeInstancesInput, _param2 ...request.Option) (*ec2.DescribeInstancesOutput, error) { - _s := []interface{}{_param0, _param1} - for _, _x := range _param2 { - _s = append(_s, _x) +// DescribeInstancesWithContext mocks base method +func (m *MockEC2) DescribeInstancesWithContext(arg0 aws.Context, arg1 *ec2.DescribeInstancesInput, arg2 ...request.Option) (*ec2.DescribeInstancesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "DescribeInstancesWithContext", _s...) + ret := m.ctrl.Call(m, "DescribeInstancesWithContext", varargs...) ret0, _ := ret[0].(*ec2.DescribeInstancesOutput) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) DescribeInstancesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - _s := append([]interface{}{arg0, arg1}, arg2...) - return _mr.mock.ctrl.RecordCall(_mr.mock, "DescribeInstancesWithContext", _s...) +// DescribeInstancesWithContext indicates an expected call of DescribeInstancesWithContext +func (mr *MockEC2MockRecorder) DescribeInstancesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstancesWithContext", reflect.TypeOf((*MockEC2)(nil).DescribeInstancesWithContext), varargs...) } -func (_m *MockEC2) DescribeVolumesWithContext(_param0 aws.Context, _param1 *ec2.DescribeVolumesInput, _param2 ...request.Option) (*ec2.DescribeVolumesOutput, error) { - _s := []interface{}{_param0, _param1} - for _, _x := range _param2 { - _s = append(_s, _x) +// DescribeSnapshotsWithContext mocks base method +func (m *MockEC2) DescribeSnapshotsWithContext(arg0 aws.Context, arg1 *ec2.DescribeSnapshotsInput, arg2 ...request.Option) (*ec2.DescribeSnapshotsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "DescribeVolumesWithContext", _s...) - ret0, _ := ret[0].(*ec2.DescribeVolumesOutput) + ret := m.ctrl.Call(m, "DescribeSnapshotsWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DescribeSnapshotsOutput) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) DescribeVolumesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - _s := append([]interface{}{arg0, arg1}, arg2...) - return _mr.mock.ctrl.RecordCall(_mr.mock, "DescribeVolumesWithContext", _s...) +// DescribeSnapshotsWithContext indicates an expected call of DescribeSnapshotsWithContext +func (mr *MockEC2MockRecorder) DescribeSnapshotsWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSnapshotsWithContext", reflect.TypeOf((*MockEC2)(nil).DescribeSnapshotsWithContext), varargs...) } -func (_m *MockEC2) DetachVolumeWithContext(_param0 aws.Context, _param1 *ec2.DetachVolumeInput, _param2 ...request.Option) (*ec2.VolumeAttachment, error) { - _s := []interface{}{_param0, _param1} - for _, _x := range _param2 { - _s = append(_s, _x) +// DescribeVolumesModificationsWithContext mocks base method +func (m *MockEC2) DescribeVolumesModificationsWithContext(arg0 aws.Context, arg1 *ec2.DescribeVolumesModificationsInput, arg2 ...request.Option) (*ec2.DescribeVolumesModificationsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "DetachVolumeWithContext", _s...) - ret0, _ := ret[0].(*ec2.VolumeAttachment) + ret := m.ctrl.Call(m, "DescribeVolumesModificationsWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DescribeVolumesModificationsOutput) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) DetachVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - _s := append([]interface{}{arg0, arg1}, arg2...) - return _mr.mock.ctrl.RecordCall(_mr.mock, "DetachVolumeWithContext", _s...) +// DescribeVolumesModificationsWithContext indicates an expected call of DescribeVolumesModificationsWithContext +func (mr *MockEC2MockRecorder) DescribeVolumesModificationsWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeVolumesModificationsWithContext", reflect.TypeOf((*MockEC2)(nil).DescribeVolumesModificationsWithContext), varargs...) } -func (_m *MockEC2) CreateSnapshotWithContext(arg0 aws.Context, arg1 *ec2.CreateSnapshotInput, arg2 ...request.Option) (*ec2.Snapshot, error) { - _s := []interface{}{arg0, arg1} +// DescribeVolumesWithContext mocks base method +func (m *MockEC2) DescribeVolumesWithContext(arg0 aws.Context, arg1 *ec2.DescribeVolumesInput, arg2 ...request.Option) (*ec2.DescribeVolumesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} for _, a := range arg2 { - _s = append(_s, a) + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "CreateSnapshotWithContext", _s...) - ret0, _ := ret[0].(*ec2.Snapshot) + ret := m.ctrl.Call(m, "DescribeVolumesWithContext", varargs...) + ret0, _ := ret[0].(*ec2.DescribeVolumesOutput) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) CreateSnapshotWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - _s := append([]interface{}{arg0, arg1}, arg2...) - return _mr.mock.ctrl.RecordCall(_mr.mock, "CreateSnapshotWithContext", _s...) +// DescribeVolumesWithContext indicates an expected call of DescribeVolumesWithContext +func (mr *MockEC2MockRecorder) DescribeVolumesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeVolumesWithContext", reflect.TypeOf((*MockEC2)(nil).DescribeVolumesWithContext), varargs...) } -func (_m *MockEC2) DeleteSnapshotWithContext(arg0 aws.Context, arg1 *ec2.DeleteSnapshotInput, arg2 ...request.Option) (*ec2.DeleteSnapshotOutput, error) { - _s := []interface{}{arg0, arg1} +// DetachVolumeWithContext mocks base method +func (m *MockEC2) DetachVolumeWithContext(arg0 aws.Context, arg1 *ec2.DetachVolumeInput, arg2 ...request.Option) (*ec2.VolumeAttachment, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} for _, a := range arg2 { - _s = append(_s, a) + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "DeleteSnapshotWithContext", _s...) - ret0, _ := ret[0].(*ec2.DeleteSnapshotOutput) + ret := m.ctrl.Call(m, "DetachVolumeWithContext", varargs...) + ret0, _ := ret[0].(*ec2.VolumeAttachment) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) DeleteSnapshotWithContext(arg0, arg1 interface{}) *gomock.Call { - _s := []interface{}{arg0, arg1} - return _mr.mock.ctrl.RecordCall(_mr.mock, "DeleteSnapshotWithContext", _s...) +// DetachVolumeWithContext indicates an expected call of DetachVolumeWithContext +func (mr *MockEC2MockRecorder) DetachVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachVolumeWithContext", reflect.TypeOf((*MockEC2)(nil).DetachVolumeWithContext), varargs...) } -func (_m *MockEC2) DescribeSnapshotsWithContext(arg0 aws.Context, arg1 *ec2.DescribeSnapshotsInput, arg2 ...request.Option) (*ec2.DescribeSnapshotsOutput, error) { - _s := []interface{}{arg0, arg1} +// ModifyVolumeWithContext mocks base method +func (m *MockEC2) ModifyVolumeWithContext(arg0 aws.Context, arg1 *ec2.ModifyVolumeInput, arg2 ...request.Option) (*ec2.ModifyVolumeOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} for _, a := range arg2 { - _s = append(_s, a) + varargs = append(varargs, a) } - ret := _m.ctrl.Call(_m, "DescribeSnapshotsWithContext", _s...) - ret0, _ := ret[0].(*ec2.DescribeSnapshotsOutput) + ret := m.ctrl.Call(m, "ModifyVolumeWithContext", varargs...) + ret0, _ := ret[0].(*ec2.ModifyVolumeOutput) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2Recorder) DescribeSnapshotsWithContext(arg0, arg1 interface{}) *gomock.Call { - _s := []interface{}{arg0, arg1} - return _mr.mock.ctrl.RecordCall(_mr.mock, "DescribeSnapshotsWithContext", _s...) +// ModifyVolumeWithContext indicates an expected call of ModifyVolumeWithContext +func (mr *MockEC2MockRecorder) ModifyVolumeWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyVolumeWithContext", reflect.TypeOf((*MockEC2)(nil).ModifyVolumeWithContext), varargs...) } diff --git a/pkg/cloud/mocks/mock_ec2metadata.go b/pkg/cloud/mocks/mock_ec2metadata.go index 15d05364ee..37e2ea0d0b 100644 --- a/pkg/cloud/mocks/mock_ec2metadata.go +++ b/pkg/cloud/mocks/mock_ec2metadata.go @@ -1,51 +1,63 @@ -// Automatically generated by MockGen. DO NOT EDIT! +// Code generated by MockGen. DO NOT EDIT. // Source: github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud (interfaces: EC2Metadata) +// Package mocks is a generated GoMock package. package mocks import ( ec2metadata "github.com/aws/aws-sdk-go/aws/ec2metadata" gomock "github.com/golang/mock/gomock" + reflect "reflect" ) -// Mock of EC2Metadata interface +// MockEC2Metadata is a mock of EC2Metadata interface type MockEC2Metadata struct { ctrl *gomock.Controller - recorder *_MockEC2MetadataRecorder + recorder *MockEC2MetadataMockRecorder } -// Recorder for MockEC2Metadata (not exported) -type _MockEC2MetadataRecorder struct { +// MockEC2MetadataMockRecorder is the mock recorder for MockEC2Metadata +type MockEC2MetadataMockRecorder struct { mock *MockEC2Metadata } +// NewMockEC2Metadata creates a new mock instance func NewMockEC2Metadata(ctrl *gomock.Controller) *MockEC2Metadata { mock := &MockEC2Metadata{ctrl: ctrl} - mock.recorder = &_MockEC2MetadataRecorder{mock} + mock.recorder = &MockEC2MetadataMockRecorder{mock} return mock } -func (_m *MockEC2Metadata) EXPECT() *_MockEC2MetadataRecorder { - return _m.recorder +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockEC2Metadata) EXPECT() *MockEC2MetadataMockRecorder { + return m.recorder } -func (_m *MockEC2Metadata) Available() bool { - ret := _m.ctrl.Call(_m, "Available") +// Available mocks base method +func (m *MockEC2Metadata) Available() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Available") ret0, _ := ret[0].(bool) return ret0 } -func (_mr *_MockEC2MetadataRecorder) Available() *gomock.Call { - return _mr.mock.ctrl.RecordCall(_mr.mock, "Available") +// Available indicates an expected call of Available +func (mr *MockEC2MetadataMockRecorder) Available() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Available", reflect.TypeOf((*MockEC2Metadata)(nil).Available)) } -func (_m *MockEC2Metadata) GetInstanceIdentityDocument() (ec2metadata.EC2InstanceIdentityDocument, error) { - ret := _m.ctrl.Call(_m, "GetInstanceIdentityDocument") +// GetInstanceIdentityDocument mocks base method +func (m *MockEC2Metadata) GetInstanceIdentityDocument() (ec2metadata.EC2InstanceIdentityDocument, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetInstanceIdentityDocument") ret0, _ := ret[0].(ec2metadata.EC2InstanceIdentityDocument) ret1, _ := ret[1].(error) return ret0, ret1 } -func (_mr *_MockEC2MetadataRecorder) GetInstanceIdentityDocument() *gomock.Call { - return _mr.mock.ctrl.RecordCall(_mr.mock, "GetInstanceIdentityDocument") +// GetInstanceIdentityDocument indicates an expected call of GetInstanceIdentityDocument +func (mr *MockEC2MetadataMockRecorder) GetInstanceIdentityDocument() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceIdentityDocument", reflect.TypeOf((*MockEC2Metadata)(nil).GetInstanceIdentityDocument)) } diff --git a/pkg/driver/node_test.go b/pkg/driver/node_test.go index 6a74188999..d0d5a5afb9 100644 --- a/pkg/driver/node_test.go +++ b/pkg/driver/node_test.go @@ -717,6 +717,13 @@ func TestNodeGetCapabilities(t *testing.T) { }, }, }, + { + Type: &csi.NodeServiceCapability_Rpc{ + Rpc: &csi.NodeServiceCapability_RPC{ + Type: csi.NodeServiceCapability_RPC_EXPAND_VOLUME, + }, + }, + }, } expResp := &csi.NodeGetCapabilitiesResponse{Capabilities: caps}