diff --git a/Makefile b/Makefile index 2d28495a..81e33d52 100644 --- a/Makefile +++ b/Makefile @@ -5,4 +5,13 @@ docs-serve: docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material docs-seed: - cp README.md docs/index.md \ No newline at end of file + cp README.md docs/index.md + +generate: + go generate ./... + +test: + go test ./... + +test-integration: + go test ./... -tags=integration \ No newline at end of file diff --git a/docs/testing.md b/docs/testing.md index 31d148ba..26a31752 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -1,20 +1,82 @@ # Testing -This is not a lot of test coverage around the resources themselves. This is due to the cost +This is not a lot of test coverage around the resources themselves. This is due to the cost of running the tests. However, +[libnuke](https://github.com/ekristen/libnuke) is extensively tested for functionality to ensure a smooth experience. -## Unit Tests +Generally speaking, the tests are split into two categories: -To unit test *aws-nuke*, some tests require [gomock](https://github.com/golang/mock) to run. However these mocks are -included in the source code already, but they can be generated by running: +1. Tool Testing +2. Resource Testing + +Furthermore, for resource testing, these are broken down into two additional categories: + +1. Mock Tests +2. Integration Tests + +## Tool Testing + +These are unit tests written against non resource focused code inside the `pkg/` directory. + +## Resource Testing + +These are unit tests written against the resources in the `resources/` directory. + +### Mock Tests + +These are tests where the AWS API calls are mocked out. This is done to ensure that the code is working as expected. +Currently, there are only two services mocked out for testing, IAM and CloudFormation. + +#### Adding Additional Mocks + +To add another service to be mocked out, you will need to do the following: + +1. Identify the service in the AWS SDK for Go +2. Create a new file in the `resources/` directory called `service_mock_test.go` +3. Add the following code to the file: (replace `` with actual service name) + ```go + //go:generate ../mocks/generate_mocks.sh iface + package resources + + // Note: empty on purpose, this file exist purely to generate mocks for the service + ``` +4. Run `make generate` to generate the mocks +5. Add tests to the `resources/_mock_test.go` file. +6. Run `make test` to ensure the tests pass +7. Submit a PR with the changes + +### Integration Tests + +These are tests where the AWS API calls are called directly and tested against a live AWS account. These tests are +behind a build flag (`-tags=integration`), so they are not run by default. To run these tests, you will need to run the following: ```bash -make generate +make test-integration ``` -Which is just a wrapper around `go generate ./...`. +#### Adding Additional Integration Tests -To run the unit tests, simply run: +To add another integration test, you will need to do the following: -```bash -make test -``` \ No newline at end of file +1. Create a new file in the `resources/` directory called `_test.go` +2. Add the following code to the file: (replace `` with actual resource name) + ```go + //go:build integration + + package resources + + import ( + "testing" + + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/" + ) + + func Test_ExampleResource_Remove(t *testing.T) { + // 1. write code to create resource in AWS using golang sdk + // 2. stub the resource struct out that is defined in .go file + // 3. call the Remove() function + // 4. assert that the resource was removed + } + ``` +3. Run `make test-integration` to ensure the tests pass +4. Submit a PR with the changes diff --git a/generate_mocks b/generate_mocks deleted file mode 100755 index cdae3dc2..00000000 --- a/generate_mocks +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -go run github.com/golang/mock/mockgen -source $(go list -m -mod=mod -f "{{.Dir}}" "github.com/aws/aws-sdk-go")/service/cloudformation/cloudformationiface/interface.go -destination mocks/mock_cloudformationiface/mock.go - -go run github.com/golang/mock/mockgen -source $(go list -m -mod=mod -f "{{.Dir}}" "github.com/aws/aws-sdk-go")/service/iam/iamiface/interface.go -destination mocks/mock_iamiface/mock.go diff --git a/generate_test.go b/generate_test.go deleted file mode 100644 index 90a5b1da..00000000 --- a/generate_test.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -//go:generate ./generate_mocks diff --git a/go.mod b/go.mod index 7e38dce3..ded36d0a 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,10 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/stevenle/topsort v0.2.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + golang.org/x/mod v0.4.2 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.14.0 // indirect + golang.org/x/tools v0.1.1 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/go.sum b/go.sum index 46793ef6..5b19cde8 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/aws/aws-sdk-go v1.49.13 h1:f4mGztsgnx2dR9r8FQYa9YW/RsKb+N7bgef4UGrOW1Y= -github.com/aws/aws-sdk-go v1.49.13/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go v1.49.21 h1:Rl8KW6HqkwzhATwvXhyr7vD4JFUMi7oXGAw9SrxxIFY= github.com/aws/aws-sdk-go v1.49.21/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= @@ -62,6 +60,7 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsr github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -89,9 +88,11 @@ golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.1 h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/mocks/generate_mocks.sh b/mocks/generate_mocks.sh new file mode 100755 index 00000000..b90fe4a6 --- /dev/null +++ b/mocks/generate_mocks.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +SERVICE=$1 +INTERFACE=$2 + +go run github.com/golang/mock/mockgen -source $(go list -m -mod=mod -f "{{.Dir}}" "github.com/aws/aws-sdk-go")/service/$SERVICE/$INTERFACE/interface.go -destination ../mocks/mock_$INTERFACE/mock.go diff --git a/mocks/mock_cloudformationiface/mock.go b/mocks/mock_cloudformationiface/mock.go index 24e253fd..49a91061 100644 --- a/mocks/mock_cloudformationiface/mock.go +++ b/mocks/mock_cloudformationiface/mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: /Users/ekristen/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.225/service/cloudformation/cloudformationiface/interface.go +// Source: /Users/ekristen/go/pkg/mod/github.com/aws/aws-sdk-go@v1.49.21/service/cloudformation/cloudformationiface/interface.go // Package mock_cloudformationiface is a generated GoMock package. package mock_cloudformationiface @@ -19,81 +19,71 @@ type MockCloudFormationAPI struct { recorder *MockCloudFormationAPIMockRecorder } -func (m *MockCloudFormationAPI) ActivateOrganizationsAccess(input *cloudformation.ActivateOrganizationsAccessInput) (*cloudformation.ActivateOrganizationsAccessOutput, error) { - //TODO implement me - panic("implement me") -} - -func (m *MockCloudFormationAPI) ActivateOrganizationsAccessWithContext(context aws.Context, input *cloudformation.ActivateOrganizationsAccessInput, option ...request.Option) (*cloudformation.ActivateOrganizationsAccessOutput, error) { - //TODO implement me - panic("implement me") -} - -func (m *MockCloudFormationAPI) ActivateOrganizationsAccessRequest(input *cloudformation.ActivateOrganizationsAccessInput) (*request.Request, *cloudformation.ActivateOrganizationsAccessOutput) { - //TODO implement me - panic("implement me") -} - -func (m *MockCloudFormationAPI) DeactivateOrganizationsAccess(input *cloudformation.DeactivateOrganizationsAccessInput) (*cloudformation.DeactivateOrganizationsAccessOutput, error) { - //TODO implement me - panic("implement me") -} - -func (m *MockCloudFormationAPI) DeactivateOrganizationsAccessWithContext(context aws.Context, input *cloudformation.DeactivateOrganizationsAccessInput, option ...request.Option) (*cloudformation.DeactivateOrganizationsAccessOutput, error) { - //TODO implement me - panic("implement me") -} - -func (m *MockCloudFormationAPI) DeactivateOrganizationsAccessRequest(input *cloudformation.DeactivateOrganizationsAccessInput) (*request.Request, *cloudformation.DeactivateOrganizationsAccessOutput) { - //TODO implement me - panic("implement me") -} - -func (m *MockCloudFormationAPI) DescribeOrganizationsAccess(input *cloudformation.DescribeOrganizationsAccessInput) (*cloudformation.DescribeOrganizationsAccessOutput, error) { - //TODO implement me - panic("implement me") +// MockCloudFormationAPIMockRecorder is the mock recorder for MockCloudFormationAPI. +type MockCloudFormationAPIMockRecorder struct { + mock *MockCloudFormationAPI } -func (m *MockCloudFormationAPI) DescribeOrganizationsAccessWithContext(context aws.Context, input *cloudformation.DescribeOrganizationsAccessInput, option ...request.Option) (*cloudformation.DescribeOrganizationsAccessOutput, error) { - //TODO implement me - panic("implement me") +// NewMockCloudFormationAPI creates a new mock instance. +func NewMockCloudFormationAPI(ctrl *gomock.Controller) *MockCloudFormationAPI { + mock := &MockCloudFormationAPI{ctrl: ctrl} + mock.recorder = &MockCloudFormationAPIMockRecorder{mock} + return mock } -func (m *MockCloudFormationAPI) DescribeOrganizationsAccessRequest(input *cloudformation.DescribeOrganizationsAccessInput) (*request.Request, *cloudformation.DescribeOrganizationsAccessOutput) { - //TODO implement me - panic("implement me") +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockCloudFormationAPI) EXPECT() *MockCloudFormationAPIMockRecorder { + return m.recorder } -func (m *MockCloudFormationAPI) ListStackInstanceResourceDrifts(input *cloudformation.ListStackInstanceResourceDriftsInput) (*cloudformation.ListStackInstanceResourceDriftsOutput, error) { - //TODO implement me - panic("implement me") +// ActivateOrganizationsAccess mocks base method. +func (m *MockCloudFormationAPI) ActivateOrganizationsAccess(arg0 *cloudformation.ActivateOrganizationsAccessInput) (*cloudformation.ActivateOrganizationsAccessOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ActivateOrganizationsAccess", arg0) + ret0, _ := ret[0].(*cloudformation.ActivateOrganizationsAccessOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 } -func (m *MockCloudFormationAPI) ListStackInstanceResourceDriftsWithContext(context aws.Context, input *cloudformation.ListStackInstanceResourceDriftsInput, option ...request.Option) (*cloudformation.ListStackInstanceResourceDriftsOutput, error) { - //TODO implement me - panic("implement me") +// ActivateOrganizationsAccess indicates an expected call of ActivateOrganizationsAccess. +func (mr *MockCloudFormationAPIMockRecorder) ActivateOrganizationsAccess(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActivateOrganizationsAccess", reflect.TypeOf((*MockCloudFormationAPI)(nil).ActivateOrganizationsAccess), arg0) } -func (m *MockCloudFormationAPI) ListStackInstanceResourceDriftsRequest(input *cloudformation.ListStackInstanceResourceDriftsInput) (*request.Request, *cloudformation.ListStackInstanceResourceDriftsOutput) { - //TODO implement me - panic("implement me") +// ActivateOrganizationsAccessRequest mocks base method. +func (m *MockCloudFormationAPI) ActivateOrganizationsAccessRequest(arg0 *cloudformation.ActivateOrganizationsAccessInput) (*request.Request, *cloudformation.ActivateOrganizationsAccessOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ActivateOrganizationsAccessRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.ActivateOrganizationsAccessOutput) + return ret0, ret1 } -// MockCloudFormationAPIMockRecorder is the mock recorder for MockCloudFormationAPI. -type MockCloudFormationAPIMockRecorder struct { - mock *MockCloudFormationAPI +// ActivateOrganizationsAccessRequest indicates an expected call of ActivateOrganizationsAccessRequest. +func (mr *MockCloudFormationAPIMockRecorder) ActivateOrganizationsAccessRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActivateOrganizationsAccessRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).ActivateOrganizationsAccessRequest), arg0) } -// NewMockCloudFormationAPI creates a new mock instance. -func NewMockCloudFormationAPI(ctrl *gomock.Controller) *MockCloudFormationAPI { - mock := &MockCloudFormationAPI{ctrl: ctrl} - mock.recorder = &MockCloudFormationAPIMockRecorder{mock} - return mock +// ActivateOrganizationsAccessWithContext mocks base method. +func (m *MockCloudFormationAPI) ActivateOrganizationsAccessWithContext(arg0 aws.Context, arg1 *cloudformation.ActivateOrganizationsAccessInput, arg2 ...request.Option) (*cloudformation.ActivateOrganizationsAccessOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ActivateOrganizationsAccessWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.ActivateOrganizationsAccessOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 } -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockCloudFormationAPI) EXPECT() *MockCloudFormationAPIMockRecorder { - return m.recorder +// ActivateOrganizationsAccessWithContext indicates an expected call of ActivateOrganizationsAccessWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ActivateOrganizationsAccessWithContext(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, "ActivateOrganizationsAccessWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ActivateOrganizationsAccessWithContext), varargs...) } // ActivateType mocks base method. @@ -496,6 +486,56 @@ func (mr *MockCloudFormationAPIMockRecorder) CreateStackWithContext(arg0, arg1 i return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStackWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).CreateStackWithContext), varargs...) } +// DeactivateOrganizationsAccess mocks base method. +func (m *MockCloudFormationAPI) DeactivateOrganizationsAccess(arg0 *cloudformation.DeactivateOrganizationsAccessInput) (*cloudformation.DeactivateOrganizationsAccessOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeactivateOrganizationsAccess", arg0) + ret0, _ := ret[0].(*cloudformation.DeactivateOrganizationsAccessOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeactivateOrganizationsAccess indicates an expected call of DeactivateOrganizationsAccess. +func (mr *MockCloudFormationAPIMockRecorder) DeactivateOrganizationsAccess(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeactivateOrganizationsAccess", reflect.TypeOf((*MockCloudFormationAPI)(nil).DeactivateOrganizationsAccess), arg0) +} + +// DeactivateOrganizationsAccessRequest mocks base method. +func (m *MockCloudFormationAPI) DeactivateOrganizationsAccessRequest(arg0 *cloudformation.DeactivateOrganizationsAccessInput) (*request.Request, *cloudformation.DeactivateOrganizationsAccessOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeactivateOrganizationsAccessRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.DeactivateOrganizationsAccessOutput) + return ret0, ret1 +} + +// DeactivateOrganizationsAccessRequest indicates an expected call of DeactivateOrganizationsAccessRequest. +func (mr *MockCloudFormationAPIMockRecorder) DeactivateOrganizationsAccessRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeactivateOrganizationsAccessRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).DeactivateOrganizationsAccessRequest), arg0) +} + +// DeactivateOrganizationsAccessWithContext mocks base method. +func (m *MockCloudFormationAPI) DeactivateOrganizationsAccessWithContext(arg0 aws.Context, arg1 *cloudformation.DeactivateOrganizationsAccessInput, arg2 ...request.Option) (*cloudformation.DeactivateOrganizationsAccessOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeactivateOrganizationsAccessWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.DeactivateOrganizationsAccessOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeactivateOrganizationsAccessWithContext indicates an expected call of DeactivateOrganizationsAccessWithContext. +func (mr *MockCloudFormationAPIMockRecorder) DeactivateOrganizationsAccessWithContext(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, "DeactivateOrganizationsAccessWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DeactivateOrganizationsAccessWithContext), varargs...) +} + // DeactivateType mocks base method. func (m *MockCloudFormationAPI) DeactivateType(arg0 *cloudformation.DeactivateTypeInput) (*cloudformation.DeactivateTypeOutput, error) { m.ctrl.T.Helper() @@ -979,6 +1019,56 @@ func (mr *MockCloudFormationAPIMockRecorder) DescribeChangeSetWithContext(arg0, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeChangeSetWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeChangeSetWithContext), varargs...) } +// DescribeOrganizationsAccess mocks base method. +func (m *MockCloudFormationAPI) DescribeOrganizationsAccess(arg0 *cloudformation.DescribeOrganizationsAccessInput) (*cloudformation.DescribeOrganizationsAccessOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeOrganizationsAccess", arg0) + ret0, _ := ret[0].(*cloudformation.DescribeOrganizationsAccessOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeOrganizationsAccess indicates an expected call of DescribeOrganizationsAccess. +func (mr *MockCloudFormationAPIMockRecorder) DescribeOrganizationsAccess(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeOrganizationsAccess", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeOrganizationsAccess), arg0) +} + +// DescribeOrganizationsAccessRequest mocks base method. +func (m *MockCloudFormationAPI) DescribeOrganizationsAccessRequest(arg0 *cloudformation.DescribeOrganizationsAccessInput) (*request.Request, *cloudformation.DescribeOrganizationsAccessOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeOrganizationsAccessRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.DescribeOrganizationsAccessOutput) + return ret0, ret1 +} + +// DescribeOrganizationsAccessRequest indicates an expected call of DescribeOrganizationsAccessRequest. +func (mr *MockCloudFormationAPIMockRecorder) DescribeOrganizationsAccessRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeOrganizationsAccessRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeOrganizationsAccessRequest), arg0) +} + +// DescribeOrganizationsAccessWithContext mocks base method. +func (m *MockCloudFormationAPI) DescribeOrganizationsAccessWithContext(arg0 aws.Context, arg1 *cloudformation.DescribeOrganizationsAccessInput, arg2 ...request.Option) (*cloudformation.DescribeOrganizationsAccessOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeOrganizationsAccessWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.DescribeOrganizationsAccessOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeOrganizationsAccessWithContext indicates an expected call of DescribeOrganizationsAccessWithContext. +func (mr *MockCloudFormationAPIMockRecorder) DescribeOrganizationsAccessWithContext(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, "DescribeOrganizationsAccessWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeOrganizationsAccessWithContext), varargs...) +} + // DescribePublisher mocks base method. func (m *MockCloudFormationAPI) DescribePublisher(arg0 *cloudformation.DescribePublisherInput) (*cloudformation.DescribePublisherOutput, error) { m.ctrl.T.Helper() @@ -2377,6 +2467,56 @@ func (mr *MockCloudFormationAPIMockRecorder) ListImportsWithContext(arg0, arg1 i return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImportsWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListImportsWithContext), varargs...) } +// ListStackInstanceResourceDrifts mocks base method. +func (m *MockCloudFormationAPI) ListStackInstanceResourceDrifts(arg0 *cloudformation.ListStackInstanceResourceDriftsInput) (*cloudformation.ListStackInstanceResourceDriftsOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListStackInstanceResourceDrifts", arg0) + ret0, _ := ret[0].(*cloudformation.ListStackInstanceResourceDriftsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListStackInstanceResourceDrifts indicates an expected call of ListStackInstanceResourceDrifts. +func (mr *MockCloudFormationAPIMockRecorder) ListStackInstanceResourceDrifts(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStackInstanceResourceDrifts", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListStackInstanceResourceDrifts), arg0) +} + +// ListStackInstanceResourceDriftsRequest mocks base method. +func (m *MockCloudFormationAPI) ListStackInstanceResourceDriftsRequest(arg0 *cloudformation.ListStackInstanceResourceDriftsInput) (*request.Request, *cloudformation.ListStackInstanceResourceDriftsOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListStackInstanceResourceDriftsRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.ListStackInstanceResourceDriftsOutput) + return ret0, ret1 +} + +// ListStackInstanceResourceDriftsRequest indicates an expected call of ListStackInstanceResourceDriftsRequest. +func (mr *MockCloudFormationAPIMockRecorder) ListStackInstanceResourceDriftsRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStackInstanceResourceDriftsRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListStackInstanceResourceDriftsRequest), arg0) +} + +// ListStackInstanceResourceDriftsWithContext mocks base method. +func (m *MockCloudFormationAPI) ListStackInstanceResourceDriftsWithContext(arg0 aws.Context, arg1 *cloudformation.ListStackInstanceResourceDriftsInput, arg2 ...request.Option) (*cloudformation.ListStackInstanceResourceDriftsOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListStackInstanceResourceDriftsWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.ListStackInstanceResourceDriftsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListStackInstanceResourceDriftsWithContext indicates an expected call of ListStackInstanceResourceDriftsWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListStackInstanceResourceDriftsWithContext(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, "ListStackInstanceResourceDriftsWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListStackInstanceResourceDriftsWithContext), varargs...) +} + // ListStackInstances mocks base method. func (m *MockCloudFormationAPI) ListStackInstances(arg0 *cloudformation.ListStackInstancesInput) (*cloudformation.ListStackInstancesOutput, error) { m.ctrl.T.Helper() diff --git a/mocks/mock_iamiface/mock.go b/mocks/mock_iamiface/mock.go index 566f8934..b475cb13 100644 --- a/mocks/mock_iamiface/mock.go +++ b/mocks/mock_iamiface/mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: /Users/ekristen/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.225/service/iam/iamiface/interface.go +// Source: /Users/ekristen/go/pkg/mod/github.com/aws/aws-sdk-go@v1.49.21/service/iam/iamiface/interface.go // Package mock_iamiface is a generated GoMock package. package mock_iamiface @@ -19,91 +19,6 @@ type MockIAMAPI struct { recorder *MockIAMAPIMockRecorder } -func (m *MockIAMAPI) GetMFADevice(input *iam.GetMFADeviceInput) (*iam.GetMFADeviceOutput, error) { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) GetMFADeviceWithContext(context aws.Context, input *iam.GetMFADeviceInput, option ...request.Option) (*iam.GetMFADeviceOutput, error) { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) GetMFADeviceRequest(input *iam.GetMFADeviceInput) (*request.Request, *iam.GetMFADeviceOutput) { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListInstanceProfileTagsPages(input *iam.ListInstanceProfileTagsInput, f func(*iam.ListInstanceProfileTagsOutput, bool) bool) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListInstanceProfileTagsPagesWithContext(context aws.Context, input *iam.ListInstanceProfileTagsInput, f func(*iam.ListInstanceProfileTagsOutput, bool) bool, option ...request.Option) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListMFADeviceTagsPages(input *iam.ListMFADeviceTagsInput, f func(*iam.ListMFADeviceTagsOutput, bool) bool) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListMFADeviceTagsPagesWithContext(context aws.Context, input *iam.ListMFADeviceTagsInput, f func(*iam.ListMFADeviceTagsOutput, bool) bool, option ...request.Option) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListOpenIDConnectProviderTagsPages(input *iam.ListOpenIDConnectProviderTagsInput, f func(*iam.ListOpenIDConnectProviderTagsOutput, bool) bool) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListOpenIDConnectProviderTagsPagesWithContext(context aws.Context, input *iam.ListOpenIDConnectProviderTagsInput, f func(*iam.ListOpenIDConnectProviderTagsOutput, bool) bool, option ...request.Option) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListPolicyTagsPages(input *iam.ListPolicyTagsInput, f func(*iam.ListPolicyTagsOutput, bool) bool) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListPolicyTagsPagesWithContext(context aws.Context, input *iam.ListPolicyTagsInput, f func(*iam.ListPolicyTagsOutput, bool) bool, option ...request.Option) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListRoleTagsPages(input *iam.ListRoleTagsInput, f func(*iam.ListRoleTagsOutput, bool) bool) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListRoleTagsPagesWithContext(context aws.Context, input *iam.ListRoleTagsInput, f func(*iam.ListRoleTagsOutput, bool) bool, option ...request.Option) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListSAMLProviderTagsPages(input *iam.ListSAMLProviderTagsInput, f func(*iam.ListSAMLProviderTagsOutput, bool) bool) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListSAMLProviderTagsPagesWithContext(context aws.Context, input *iam.ListSAMLProviderTagsInput, f func(*iam.ListSAMLProviderTagsOutput, bool) bool, option ...request.Option) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListServerCertificateTagsPages(input *iam.ListServerCertificateTagsInput, f func(*iam.ListServerCertificateTagsOutput, bool) bool) error { - //TODO implement me - panic("implement me") -} - -func (m *MockIAMAPI) ListServerCertificateTagsPagesWithContext(context aws.Context, input *iam.ListServerCertificateTagsInput, f func(*iam.ListServerCertificateTagsOutput, bool) bool, option ...request.Option) error { - //TODO implement me - panic("implement me") -} - // MockIAMAPIMockRecorder is the mock recorder for MockIAMAPI. type MockIAMAPIMockRecorder struct { mock *MockIAMAPI @@ -3337,6 +3252,56 @@ func (mr *MockIAMAPIMockRecorder) GetLoginProfileWithContext(arg0, arg1 interfac return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLoginProfileWithContext", reflect.TypeOf((*MockIAMAPI)(nil).GetLoginProfileWithContext), varargs...) } +// GetMFADevice mocks base method. +func (m *MockIAMAPI) GetMFADevice(arg0 *iam.GetMFADeviceInput) (*iam.GetMFADeviceOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMFADevice", arg0) + ret0, _ := ret[0].(*iam.GetMFADeviceOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMFADevice indicates an expected call of GetMFADevice. +func (mr *MockIAMAPIMockRecorder) GetMFADevice(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMFADevice", reflect.TypeOf((*MockIAMAPI)(nil).GetMFADevice), arg0) +} + +// GetMFADeviceRequest mocks base method. +func (m *MockIAMAPI) GetMFADeviceRequest(arg0 *iam.GetMFADeviceInput) (*request.Request, *iam.GetMFADeviceOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMFADeviceRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*iam.GetMFADeviceOutput) + return ret0, ret1 +} + +// GetMFADeviceRequest indicates an expected call of GetMFADeviceRequest. +func (mr *MockIAMAPIMockRecorder) GetMFADeviceRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMFADeviceRequest", reflect.TypeOf((*MockIAMAPI)(nil).GetMFADeviceRequest), arg0) +} + +// GetMFADeviceWithContext mocks base method. +func (m *MockIAMAPI) GetMFADeviceWithContext(arg0 aws.Context, arg1 *iam.GetMFADeviceInput, arg2 ...request.Option) (*iam.GetMFADeviceOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetMFADeviceWithContext", varargs...) + ret0, _ := ret[0].(*iam.GetMFADeviceOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMFADeviceWithContext indicates an expected call of GetMFADeviceWithContext. +func (mr *MockIAMAPIMockRecorder) GetMFADeviceWithContext(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, "GetMFADeviceWithContext", reflect.TypeOf((*MockIAMAPI)(nil).GetMFADeviceWithContext), varargs...) +} + // GetOpenIDConnectProvider mocks base method. func (m *MockIAMAPI) GetOpenIDConnectProvider(arg0 *iam.GetOpenIDConnectProviderInput) (*iam.GetOpenIDConnectProviderOutput, error) { m.ctrl.T.Helper() @@ -4799,6 +4764,39 @@ func (mr *MockIAMAPIMockRecorder) ListInstanceProfileTags(arg0 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInstanceProfileTags", reflect.TypeOf((*MockIAMAPI)(nil).ListInstanceProfileTags), arg0) } +// ListInstanceProfileTagsPages mocks base method. +func (m *MockIAMAPI) ListInstanceProfileTagsPages(arg0 *iam.ListInstanceProfileTagsInput, arg1 func(*iam.ListInstanceProfileTagsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListInstanceProfileTagsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListInstanceProfileTagsPages indicates an expected call of ListInstanceProfileTagsPages. +func (mr *MockIAMAPIMockRecorder) ListInstanceProfileTagsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInstanceProfileTagsPages", reflect.TypeOf((*MockIAMAPI)(nil).ListInstanceProfileTagsPages), arg0, arg1) +} + +// ListInstanceProfileTagsPagesWithContext mocks base method. +func (m *MockIAMAPI) ListInstanceProfileTagsPagesWithContext(arg0 aws.Context, arg1 *iam.ListInstanceProfileTagsInput, arg2 func(*iam.ListInstanceProfileTagsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListInstanceProfileTagsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListInstanceProfileTagsPagesWithContext indicates an expected call of ListInstanceProfileTagsPagesWithContext. +func (mr *MockIAMAPIMockRecorder) ListInstanceProfileTagsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInstanceProfileTagsPagesWithContext", reflect.TypeOf((*MockIAMAPI)(nil).ListInstanceProfileTagsPagesWithContext), varargs...) +} + // ListInstanceProfileTagsRequest mocks base method. func (m *MockIAMAPI) ListInstanceProfileTagsRequest(arg0 *iam.ListInstanceProfileTagsInput) (*request.Request, *iam.ListInstanceProfileTagsOutput) { m.ctrl.T.Helper() @@ -5015,6 +5013,39 @@ func (mr *MockIAMAPIMockRecorder) ListMFADeviceTags(arg0 interface{}) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMFADeviceTags", reflect.TypeOf((*MockIAMAPI)(nil).ListMFADeviceTags), arg0) } +// ListMFADeviceTagsPages mocks base method. +func (m *MockIAMAPI) ListMFADeviceTagsPages(arg0 *iam.ListMFADeviceTagsInput, arg1 func(*iam.ListMFADeviceTagsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListMFADeviceTagsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListMFADeviceTagsPages indicates an expected call of ListMFADeviceTagsPages. +func (mr *MockIAMAPIMockRecorder) ListMFADeviceTagsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMFADeviceTagsPages", reflect.TypeOf((*MockIAMAPI)(nil).ListMFADeviceTagsPages), arg0, arg1) +} + +// ListMFADeviceTagsPagesWithContext mocks base method. +func (m *MockIAMAPI) ListMFADeviceTagsPagesWithContext(arg0 aws.Context, arg1 *iam.ListMFADeviceTagsInput, arg2 func(*iam.ListMFADeviceTagsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListMFADeviceTagsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListMFADeviceTagsPagesWithContext indicates an expected call of ListMFADeviceTagsPagesWithContext. +func (mr *MockIAMAPIMockRecorder) ListMFADeviceTagsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMFADeviceTagsPagesWithContext", reflect.TypeOf((*MockIAMAPI)(nil).ListMFADeviceTagsPagesWithContext), varargs...) +} + // ListMFADeviceTagsRequest mocks base method. func (m *MockIAMAPI) ListMFADeviceTagsRequest(arg0 *iam.ListMFADeviceTagsInput) (*request.Request, *iam.ListMFADeviceTagsOutput) { m.ctrl.T.Helper() @@ -5148,6 +5179,39 @@ func (mr *MockIAMAPIMockRecorder) ListOpenIDConnectProviderTags(arg0 interface{} return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenIDConnectProviderTags", reflect.TypeOf((*MockIAMAPI)(nil).ListOpenIDConnectProviderTags), arg0) } +// ListOpenIDConnectProviderTagsPages mocks base method. +func (m *MockIAMAPI) ListOpenIDConnectProviderTagsPages(arg0 *iam.ListOpenIDConnectProviderTagsInput, arg1 func(*iam.ListOpenIDConnectProviderTagsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListOpenIDConnectProviderTagsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListOpenIDConnectProviderTagsPages indicates an expected call of ListOpenIDConnectProviderTagsPages. +func (mr *MockIAMAPIMockRecorder) ListOpenIDConnectProviderTagsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenIDConnectProviderTagsPages", reflect.TypeOf((*MockIAMAPI)(nil).ListOpenIDConnectProviderTagsPages), arg0, arg1) +} + +// ListOpenIDConnectProviderTagsPagesWithContext mocks base method. +func (m *MockIAMAPI) ListOpenIDConnectProviderTagsPagesWithContext(arg0 aws.Context, arg1 *iam.ListOpenIDConnectProviderTagsInput, arg2 func(*iam.ListOpenIDConnectProviderTagsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOpenIDConnectProviderTagsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListOpenIDConnectProviderTagsPagesWithContext indicates an expected call of ListOpenIDConnectProviderTagsPagesWithContext. +func (mr *MockIAMAPIMockRecorder) ListOpenIDConnectProviderTagsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOpenIDConnectProviderTagsPagesWithContext", reflect.TypeOf((*MockIAMAPI)(nil).ListOpenIDConnectProviderTagsPagesWithContext), varargs...) +} + // ListOpenIDConnectProviderTagsRequest mocks base method. func (m *MockIAMAPI) ListOpenIDConnectProviderTagsRequest(arg0 *iam.ListOpenIDConnectProviderTagsInput) (*request.Request, *iam.ListOpenIDConnectProviderTagsOutput) { m.ctrl.T.Helper() @@ -5381,6 +5445,39 @@ func (mr *MockIAMAPIMockRecorder) ListPolicyTags(arg0 interface{}) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPolicyTags", reflect.TypeOf((*MockIAMAPI)(nil).ListPolicyTags), arg0) } +// ListPolicyTagsPages mocks base method. +func (m *MockIAMAPI) ListPolicyTagsPages(arg0 *iam.ListPolicyTagsInput, arg1 func(*iam.ListPolicyTagsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListPolicyTagsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListPolicyTagsPages indicates an expected call of ListPolicyTagsPages. +func (mr *MockIAMAPIMockRecorder) ListPolicyTagsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPolicyTagsPages", reflect.TypeOf((*MockIAMAPI)(nil).ListPolicyTagsPages), arg0, arg1) +} + +// ListPolicyTagsPagesWithContext mocks base method. +func (m *MockIAMAPI) ListPolicyTagsPagesWithContext(arg0 aws.Context, arg1 *iam.ListPolicyTagsInput, arg2 func(*iam.ListPolicyTagsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListPolicyTagsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListPolicyTagsPagesWithContext indicates an expected call of ListPolicyTagsPagesWithContext. +func (mr *MockIAMAPIMockRecorder) ListPolicyTagsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPolicyTagsPagesWithContext", reflect.TypeOf((*MockIAMAPI)(nil).ListPolicyTagsPagesWithContext), varargs...) +} + // ListPolicyTagsRequest mocks base method. func (m *MockIAMAPI) ListPolicyTagsRequest(arg0 *iam.ListPolicyTagsInput) (*request.Request, *iam.ListPolicyTagsOutput) { m.ctrl.T.Helper() @@ -5597,6 +5694,39 @@ func (mr *MockIAMAPIMockRecorder) ListRoleTags(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRoleTags", reflect.TypeOf((*MockIAMAPI)(nil).ListRoleTags), arg0) } +// ListRoleTagsPages mocks base method. +func (m *MockIAMAPI) ListRoleTagsPages(arg0 *iam.ListRoleTagsInput, arg1 func(*iam.ListRoleTagsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListRoleTagsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListRoleTagsPages indicates an expected call of ListRoleTagsPages. +func (mr *MockIAMAPIMockRecorder) ListRoleTagsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRoleTagsPages", reflect.TypeOf((*MockIAMAPI)(nil).ListRoleTagsPages), arg0, arg1) +} + +// ListRoleTagsPagesWithContext mocks base method. +func (m *MockIAMAPI) ListRoleTagsPagesWithContext(arg0 aws.Context, arg1 *iam.ListRoleTagsInput, arg2 func(*iam.ListRoleTagsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListRoleTagsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListRoleTagsPagesWithContext indicates an expected call of ListRoleTagsPagesWithContext. +func (mr *MockIAMAPIMockRecorder) ListRoleTagsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRoleTagsPagesWithContext", reflect.TypeOf((*MockIAMAPI)(nil).ListRoleTagsPagesWithContext), varargs...) +} + // ListRoleTagsRequest mocks base method. func (m *MockIAMAPI) ListRoleTagsRequest(arg0 *iam.ListRoleTagsInput) (*request.Request, *iam.ListRoleTagsOutput) { m.ctrl.T.Helper() @@ -5730,6 +5860,39 @@ func (mr *MockIAMAPIMockRecorder) ListSAMLProviderTags(arg0 interface{}) *gomock return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSAMLProviderTags", reflect.TypeOf((*MockIAMAPI)(nil).ListSAMLProviderTags), arg0) } +// ListSAMLProviderTagsPages mocks base method. +func (m *MockIAMAPI) ListSAMLProviderTagsPages(arg0 *iam.ListSAMLProviderTagsInput, arg1 func(*iam.ListSAMLProviderTagsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListSAMLProviderTagsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListSAMLProviderTagsPages indicates an expected call of ListSAMLProviderTagsPages. +func (mr *MockIAMAPIMockRecorder) ListSAMLProviderTagsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSAMLProviderTagsPages", reflect.TypeOf((*MockIAMAPI)(nil).ListSAMLProviderTagsPages), arg0, arg1) +} + +// ListSAMLProviderTagsPagesWithContext mocks base method. +func (m *MockIAMAPI) ListSAMLProviderTagsPagesWithContext(arg0 aws.Context, arg1 *iam.ListSAMLProviderTagsInput, arg2 func(*iam.ListSAMLProviderTagsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListSAMLProviderTagsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListSAMLProviderTagsPagesWithContext indicates an expected call of ListSAMLProviderTagsPagesWithContext. +func (mr *MockIAMAPIMockRecorder) ListSAMLProviderTagsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSAMLProviderTagsPagesWithContext", reflect.TypeOf((*MockIAMAPI)(nil).ListSAMLProviderTagsPagesWithContext), varargs...) +} + // ListSAMLProviderTagsRequest mocks base method. func (m *MockIAMAPI) ListSAMLProviderTagsRequest(arg0 *iam.ListSAMLProviderTagsInput) (*request.Request, *iam.ListSAMLProviderTagsOutput) { m.ctrl.T.Helper() @@ -5913,6 +6076,39 @@ func (mr *MockIAMAPIMockRecorder) ListServerCertificateTags(arg0 interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListServerCertificateTags", reflect.TypeOf((*MockIAMAPI)(nil).ListServerCertificateTags), arg0) } +// ListServerCertificateTagsPages mocks base method. +func (m *MockIAMAPI) ListServerCertificateTagsPages(arg0 *iam.ListServerCertificateTagsInput, arg1 func(*iam.ListServerCertificateTagsOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListServerCertificateTagsPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListServerCertificateTagsPages indicates an expected call of ListServerCertificateTagsPages. +func (mr *MockIAMAPIMockRecorder) ListServerCertificateTagsPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListServerCertificateTagsPages", reflect.TypeOf((*MockIAMAPI)(nil).ListServerCertificateTagsPages), arg0, arg1) +} + +// ListServerCertificateTagsPagesWithContext mocks base method. +func (m *MockIAMAPI) ListServerCertificateTagsPagesWithContext(arg0 aws.Context, arg1 *iam.ListServerCertificateTagsInput, arg2 func(*iam.ListServerCertificateTagsOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListServerCertificateTagsPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListServerCertificateTagsPagesWithContext indicates an expected call of ListServerCertificateTagsPagesWithContext. +func (mr *MockIAMAPIMockRecorder) ListServerCertificateTagsPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListServerCertificateTagsPagesWithContext", reflect.TypeOf((*MockIAMAPI)(nil).ListServerCertificateTagsPagesWithContext), varargs...) +} + // ListServerCertificateTagsRequest mocks base method. func (m *MockIAMAPI) ListServerCertificateTagsRequest(arg0 *iam.ListServerCertificateTagsInput) (*request.Request, *iam.ListServerCertificateTagsOutput) { m.ctrl.T.Helper() diff --git a/resources/cloudformation_mock_test.go b/resources/cloudformation_mock_test.go new file mode 100644 index 00000000..882a94ce --- /dev/null +++ b/resources/cloudformation_mock_test.go @@ -0,0 +1,4 @@ +//go:generate ../mocks/generate_mocks.sh cloudformation cloudformationiface +package resources + +// Note: empty on purpose, this file exist purely to generate mocks for the CloudFormation service diff --git a/resources/iam_mock_test.go b/resources/iam_mock_test.go new file mode 100644 index 00000000..9b563cd4 --- /dev/null +++ b/resources/iam_mock_test.go @@ -0,0 +1,4 @@ +//go:generate ../mocks/generate_mocks.sh iam iamiface +package resources + +// Note: empty on purpose, this file exist purely to generate mocks for the IAM service