commit
b924fe8e08
|
@ -1,6 +1,5 @@
|
|||
version: 2.1
|
||||
orbs:
|
||||
aws-cli: circleci/aws-cli@1.3.0
|
||||
go: circleci/go@1.5.0
|
||||
jobs:
|
||||
build:
|
||||
|
@ -167,15 +166,18 @@ jobs:
|
|||
git commit -m "Updated to version ${CIRCLE_TAG}"
|
||||
git push
|
||||
update-lambda:
|
||||
executor: aws-cli/default
|
||||
environment:
|
||||
FUNCTION_NAME: driftctl-version
|
||||
docker:
|
||||
- image: cimg/base:2021.04
|
||||
steps:
|
||||
- aws-cli/install
|
||||
- run:
|
||||
name: "Update Lambda version"
|
||||
command: |
|
||||
aws lambda update-function-configuration --function-name $FUNCTION_NAME --environment "{\"Variables\":{\"LATEST_VERSION\":\"$CIRCLE_TAG\"}}"
|
||||
wget "https://github.com/cloudskiff/lambda-env-updater/releases/download/v1.0.0/lambda-env-updater_linux_amd64" && chmod +x lambda-env-updater_linux_amd64
|
||||
./lambda-env-updater_linux_amd64\
|
||||
-name ${FUNCTION_NAME}\
|
||||
-env "LATEST_VERSION=${CIRCLE_TAG}"
|
||||
workflows:
|
||||
nightly:
|
||||
jobs:
|
||||
|
|
1
go.mod
1
go.mod
|
@ -4,6 +4,7 @@ go 1.16
|
|||
|
||||
require (
|
||||
github.com/aws/aws-sdk-go v1.34.2
|
||||
github.com/bmatcuk/doublestar/v4 v4.0.1 // indirect
|
||||
github.com/eapache/go-resiliency v1.2.0
|
||||
github.com/fatih/color v1.9.0
|
||||
github.com/getsentry/sentry-go v0.10.0
|
||||
|
|
2
go.sum
2
go.sum
|
@ -162,6 +162,8 @@ github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3
|
|||
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
|
||||
github.com/bmatcuk/doublestar v1.1.5 h1:2bNwBOmhyFEFcoB3tGvTD5xanq+4kyOZlB8wFYbMjkk=
|
||||
github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
|
||||
github.com/bmatcuk/doublestar/v4 v4.0.1 h1:v5DFrvGpNnIKPlG7gcF4TlceHwBTvHdmjgDEkbDk9t8=
|
||||
github.com/bmatcuk/doublestar/v4 v4.0.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
|
||||
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
|
||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/r3labs/diff/v2"
|
||||
|
||||
|
@ -39,6 +40,7 @@ type Analysis struct {
|
|||
differences []Difference
|
||||
summary Summary
|
||||
alerts alerter.Alerts
|
||||
Duration time.Duration
|
||||
}
|
||||
|
||||
type serializableDifference struct {
|
||||
|
|
|
@ -62,6 +62,7 @@ func NewDriftctlCmd(build build.BuildInterface) *DriftctlCmd {
|
|||
|
||||
cmd.PersistentFlags().BoolP("help", "h", false, "Display help for command")
|
||||
cmd.PersistentFlags().BoolP("no-version-check", "", false, "Disable the version check")
|
||||
cmd.PersistentFlags().BoolP("disable-telemetry", "", false, "Disable telemetry")
|
||||
cmd.PersistentFlags().BoolP("send-crash-report", "", false, "Enable error reporting. Crash data will be sent to us via Sentry.\nWARNING: may leak sensitive data (please read the documentation for more details)\nThis flag should be used only if an error occurs during execution")
|
||||
|
||||
cmd.AddCommand(NewScanCmd())
|
||||
|
|
|
@ -99,7 +99,7 @@ func TestDriftctlCmd_Scan(t *testing.T) {
|
|||
env: map[string]string{
|
||||
"DCTL_FROM": "test",
|
||||
},
|
||||
err: fmt.Errorf("Unable to parse from flag 'test': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://"),
|
||||
err: fmt.Errorf("Unable to parse from flag 'test': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://,tfstate+tfcloud://"),
|
||||
},
|
||||
{
|
||||
env: map[string]string{
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/telemetry"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -75,6 +76,7 @@ func NewScanCmd() *cobra.Command {
|
|||
}
|
||||
|
||||
opts.Quiet, _ = cmd.Flags().GetBool("quiet")
|
||||
opts.DisableTelemetry, _ = cmd.Flags().GetBool("disable-telemetry")
|
||||
|
||||
return nil
|
||||
},
|
||||
|
@ -128,6 +130,12 @@ func NewScanCmd() *cobra.Command {
|
|||
"Use those HTTP headers to query the provided URL.\n"+
|
||||
"Only used with tfstate+http(s) backend for now.\n",
|
||||
)
|
||||
fl.StringVar(&opts.BackendOptions.TFCloudToken,
|
||||
"tfc-token",
|
||||
"",
|
||||
"Terraform Cloud / Enterprise API token.\n"+
|
||||
"Only used with tfstate+tfcloud backend.\n",
|
||||
)
|
||||
fl.BoolVar(&opts.StrictMode,
|
||||
"strict",
|
||||
false,
|
||||
|
@ -147,11 +155,12 @@ func scanRun(opts *pkg.ScanOptions) error {
|
|||
providerLibrary := terraform.NewProviderLibrary()
|
||||
supplierLibrary := resource.NewSupplierLibrary()
|
||||
|
||||
progress := globaloutput.NewProgress()
|
||||
iacProgress := globaloutput.NewProgress("Scanning states", "Scanned states", true)
|
||||
scanProgress := globaloutput.NewProgress("Scanning resources", "Scanned resources", true)
|
||||
|
||||
resourceSchemaRepository := resource.NewSchemaRepository()
|
||||
|
||||
err := remote.Activate(opts.To, alerter, providerLibrary, supplierLibrary, progress, resourceSchemaRepository)
|
||||
err := remote.Activate(opts.To, alerter, providerLibrary, supplierLibrary, scanProgress, resourceSchemaRepository)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -165,14 +174,14 @@ func scanRun(opts *pkg.ScanOptions) error {
|
|||
|
||||
scanner := pkg.NewScanner(supplierLibrary.Suppliers(), alerter, resourceSchemaRepository)
|
||||
|
||||
iacSupplier, err := supplier.GetIACSupplier(opts.From, providerLibrary, opts.BackendOptions, resourceSchemaRepository)
|
||||
iacSupplier, err := supplier.GetIACSupplier(opts.From, providerLibrary, opts.BackendOptions, iacProgress, resourceSchemaRepository)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resFactory := terraform.NewTerraformResourceFactory(providerLibrary, resourceSchemaRepository)
|
||||
|
||||
ctl := pkg.NewDriftCTL(scanner, iacSupplier, alerter, resFactory, opts, resourceSchemaRepository)
|
||||
ctl := pkg.NewDriftCTL(scanner, iacSupplier, alerter, resFactory, opts, scanProgress, iacProgress, resourceSchemaRepository)
|
||||
|
||||
go func() {
|
||||
<-c
|
||||
|
@ -180,10 +189,7 @@ func scanRun(opts *pkg.ScanOptions) error {
|
|||
ctl.Stop()
|
||||
}()
|
||||
|
||||
progress.Start()
|
||||
analysis, err := ctl.Run()
|
||||
progress.Stop()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -193,6 +199,10 @@ func scanRun(opts *pkg.ScanOptions) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if !opts.DisableTelemetry {
|
||||
telemetry.SendTelemetry(analysis)
|
||||
}
|
||||
|
||||
if !analysis.IsSync() {
|
||||
return cmderrors.InfrastructureNotInSync{}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ func TestScanCmd_Valid(t *testing.T) {
|
|||
{args: []string{"scan", "-t", "aws+tf", "-f", "tfstate://test"}},
|
||||
{args: []string{"scan", "--to", "aws+tf", "--from", "tfstate://test"}},
|
||||
{args: []string{"scan", "--to", "aws+tf", "--from", "tfstate+https://github.com/state.tfstate"}},
|
||||
{args: []string{"scan", "--to", "aws+tf", "--from", "tfstate+tfcloud://workspace_id"}},
|
||||
{args: []string{"scan", "--tfc-token", "token"}},
|
||||
{args: []string{"scan", "--filter", "Type=='aws_s3_bucket'"}},
|
||||
{args: []string{"scan", "--strict"}},
|
||||
}
|
||||
|
@ -69,14 +71,14 @@ func TestScanCmd_Invalid(t *testing.T) {
|
|||
{args: []string{"scan", "-f"}, expected: `flag needs an argument: 'f' in -f`},
|
||||
{args: []string{"scan", "--from"}, expected: `flag needs an argument: --from`},
|
||||
{args: []string{"scan", "--from"}, expected: `flag needs an argument: --from`},
|
||||
{args: []string{"scan", "--from", "tosdgjhgsdhgkjs"}, expected: "Unable to parse from flag 'tosdgjhgsdhgkjs': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://"},
|
||||
{args: []string{"scan", "--from", "://"}, expected: "Unable to parse from flag '://': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://"},
|
||||
{args: []string{"scan", "--from", "://test"}, expected: "Unable to parse from flag '://test': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://"},
|
||||
{args: []string{"scan", "--from", "tosdgjhgsdhgkjs://"}, expected: "Unable to parse from flag 'tosdgjhgsdhgkjs://': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://"},
|
||||
{args: []string{"scan", "--from", "terraform+foo+bar://test"}, expected: "Unable to parse from scheme 'terraform+foo+bar': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://"},
|
||||
{args: []string{"scan", "--from", "tosdgjhgsdhgkjs"}, expected: "Unable to parse from flag 'tosdgjhgsdhgkjs': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://,tfstate+tfcloud://"},
|
||||
{args: []string{"scan", "--from", "://"}, expected: "Unable to parse from flag '://': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://,tfstate+tfcloud://"},
|
||||
{args: []string{"scan", "--from", "://test"}, expected: "Unable to parse from flag '://test': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://,tfstate+tfcloud://"},
|
||||
{args: []string{"scan", "--from", "tosdgjhgsdhgkjs://"}, expected: "Unable to parse from flag 'tosdgjhgsdhgkjs://': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://,tfstate+tfcloud://"},
|
||||
{args: []string{"scan", "--from", "terraform+foo+bar://test"}, expected: "Unable to parse from scheme 'terraform+foo+bar': \nAccepted schemes are: tfstate://,tfstate+s3://,tfstate+http://,tfstate+https://,tfstate+tfcloud://"},
|
||||
{args: []string{"scan", "--from", "unsupported://test"}, expected: "Unsupported IaC source 'unsupported': \nAccepted values are: tfstate"},
|
||||
{args: []string{"scan", "--from", "tfstate+foobar://test"}, expected: "Unsupported IaC backend 'foobar': \nAccepted values are: s3,http,https"},
|
||||
{args: []string{"scan", "--from", "tfstate:///tmp/test", "--from", "tfstate+toto://test"}, expected: "Unsupported IaC backend 'toto': \nAccepted values are: s3,http,https"},
|
||||
{args: []string{"scan", "--from", "tfstate+foobar://test"}, expected: "Unsupported IaC backend 'foobar': \nAccepted values are: s3,http,https,tfcloud"},
|
||||
{args: []string{"scan", "--from", "tfstate:///tmp/test", "--from", "tfstate+toto://test"}, expected: "Unsupported IaC backend 'toto': \nAccepted values are: s3,http,https,tfcloud"},
|
||||
{args: []string{"scan", "--filter", "Type='test'"}, expected: "unable to parse filter expression: SyntaxError: Expected tRbracket, received: tUnknown"},
|
||||
{args: []string{"scan", "--filter", "Type='test'", "--filter", "Type='test2'"}, expected: "Filter flag should be specified only once"},
|
||||
}
|
||||
|
|
|
@ -2,7 +2,9 @@ package pkg
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
globaloutput "github.com/cloudskiff/driftctl/pkg/output"
|
||||
"github.com/jmespath/go-jmespath"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
|
@ -17,15 +19,16 @@ import (
|
|||
)
|
||||
|
||||
type ScanOptions struct {
|
||||
Coverage bool
|
||||
Detect bool
|
||||
From []config.SupplierConfig
|
||||
To string
|
||||
Output output.OutputConfig
|
||||
Filter *jmespath.JMESPath
|
||||
Quiet bool
|
||||
BackendOptions *backend.Options
|
||||
StrictMode bool
|
||||
Coverage bool
|
||||
Detect bool
|
||||
From []config.SupplierConfig
|
||||
To string
|
||||
Output output.OutputConfig
|
||||
Filter *jmespath.JMESPath
|
||||
Quiet bool
|
||||
BackendOptions *backend.Options
|
||||
StrictMode bool
|
||||
DisableTelemetry bool
|
||||
}
|
||||
|
||||
type DriftCTL struct {
|
||||
|
@ -36,10 +39,12 @@ type DriftCTL struct {
|
|||
filter *jmespath.JMESPath
|
||||
resourceFactory resource.ResourceFactory
|
||||
strictMode bool
|
||||
scanProgress globaloutput.Progress
|
||||
iacProgress globaloutput.Progress
|
||||
resourceSchemaRepository resource.SchemaRepositoryInterface
|
||||
}
|
||||
|
||||
func NewDriftCTL(remoteSupplier resource.Supplier, iacSupplier resource.Supplier, alerter *alerter.Alerter, resFactory resource.ResourceFactory, opts *ScanOptions, resourceSchemaRepository resource.SchemaRepositoryInterface) *DriftCTL {
|
||||
func NewDriftCTL(remoteSupplier resource.Supplier, iacSupplier resource.Supplier, alerter *alerter.Alerter, resFactory resource.ResourceFactory, opts *ScanOptions, scanProgress globaloutput.Progress, iacProgress globaloutput.Progress, resourceSchemaRepository resource.SchemaRepositoryInterface) *DriftCTL {
|
||||
return &DriftCTL{
|
||||
remoteSupplier,
|
||||
iacSupplier,
|
||||
|
@ -48,11 +53,14 @@ func NewDriftCTL(remoteSupplier resource.Supplier, iacSupplier resource.Supplier
|
|||
opts.Filter,
|
||||
resFactory,
|
||||
opts.StrictMode,
|
||||
scanProgress,
|
||||
iacProgress,
|
||||
resourceSchemaRepository,
|
||||
}
|
||||
}
|
||||
|
||||
func (d DriftCTL) Run() (*analyser.Analysis, error) {
|
||||
start := time.Now()
|
||||
remoteResources, resourcesFromState, err := d.scan()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -108,6 +116,7 @@ func (d DriftCTL) Run() (*analyser.Analysis, error) {
|
|||
driftIgnore := filter.NewDriftIgnore()
|
||||
|
||||
analysis, err := d.analyzer.Analyze(remoteResources, resourcesFromState, driftIgnore)
|
||||
analysis.Duration = time.Since(start)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -133,12 +142,16 @@ func (d DriftCTL) Stop() {
|
|||
|
||||
func (d DriftCTL) scan() (remoteResources []resource.Resource, resourcesFromState []resource.Resource, err error) {
|
||||
logrus.Info("Start reading IaC")
|
||||
d.iacProgress.Start()
|
||||
resourcesFromState, err = d.iacSupplier.Resources()
|
||||
d.iacProgress.Stop()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
logrus.Info("Start scanning cloud provider")
|
||||
d.scanProgress.Start()
|
||||
defer d.scanProgress.Stop()
|
||||
remoteResources, err = d.remoteSupplier.Resources()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
"github.com/cloudskiff/driftctl/pkg/alerter"
|
||||
"github.com/cloudskiff/driftctl/pkg/analyser"
|
||||
"github.com/cloudskiff/driftctl/pkg/filter"
|
||||
"github.com/cloudskiff/driftctl/pkg/output"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource/github"
|
||||
|
@ -72,11 +73,20 @@ func runTest(t *testing.T, cases TestCases) {
|
|||
c.mocks(resourceFactory)
|
||||
}
|
||||
|
||||
driftctl := pkg.NewDriftCTL(remoteSupplier, stateSupplier, testAlerter, resourceFactory, c.options, repo)
|
||||
scanProgress := &output.MockProgress{}
|
||||
scanProgress.On("Start").Return().Once()
|
||||
scanProgress.On("Stop").Return().Once()
|
||||
|
||||
iacProgress := &output.MockProgress{}
|
||||
iacProgress.On("Start").Return().Once()
|
||||
iacProgress.On("Stop").Return().Once()
|
||||
|
||||
driftctl := pkg.NewDriftCTL(remoteSupplier, stateSupplier, testAlerter, resourceFactory, c.options, scanProgress, iacProgress, repo)
|
||||
|
||||
analysis, err := driftctl.Run()
|
||||
|
||||
c.assert(test.NewScanResult(t, analysis), err)
|
||||
scanProgress.AssertExpectations(t)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -93,6 +103,15 @@ func matchByAttributes(input, attrs map[string]interface{}) bool {
|
|||
func TestDriftctlRun_BasicBehavior(t *testing.T) {
|
||||
|
||||
cases := TestCases{
|
||||
{
|
||||
name: "analysis duration is set",
|
||||
stateResources: []resource.Resource{},
|
||||
remoteResources: []resource.Resource{},
|
||||
assert: func(result *test.ScanResult, err error) {
|
||||
result.NotZero(result.Duration)
|
||||
},
|
||||
options: &pkg.ScanOptions{},
|
||||
},
|
||||
{
|
||||
name: "infrastructure should be in sync",
|
||||
stateResources: []resource.Resource{
|
||||
|
@ -296,7 +315,7 @@ func TestDriftctlRun_BasicBehavior(t *testing.T) {
|
|||
},
|
||||
assert: func(result *test.ScanResult, err error) {
|
||||
result.AssertManagedCount(2)
|
||||
result.AssertUnmanagedCount(1)
|
||||
result.AssertUnmanagedCount(2)
|
||||
result.AssertDeletedCount(0)
|
||||
result.AssertDriftCountTotal(0)
|
||||
},
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package http
|
||||
|
||||
import "net/http"
|
||||
|
||||
// HTTPClient is an interface for http.Client type
|
||||
type HTTPClient interface {
|
||||
Do(req *http.Request) (*http.Response, error)
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
|
||||
|
||||
package http
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// MockHTTPClient is an autogenerated mock type for the HTTPClient type
|
||||
type MockHTTPClient struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Do provides a mock function with given fields: req
|
||||
func (_m *MockHTTPClient) Do(req *http.Request) (*http.Response, error) {
|
||||
ret := _m.Called(req)
|
||||
|
||||
var r0 *http.Response
|
||||
if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok {
|
||||
r0 = rf(req)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*http.Response)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*http.Request) error); ok {
|
||||
r1 = rf(req)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/terraform/state/backend"
|
||||
"github.com/cloudskiff/driftctl/pkg/output"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
@ -28,7 +29,7 @@ func IsSupplierSupported(supplierKey string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func GetIACSupplier(configs []config.SupplierConfig, library *terraform.ProviderLibrary, backendOpts *backend.Options, resourceSchemaRepository resource.SchemaRepositoryInterface) (resource.Supplier, error) {
|
||||
func GetIACSupplier(configs []config.SupplierConfig, library *terraform.ProviderLibrary, backendOpts *backend.Options, progress output.Progress, resourceSchemaRepository resource.SchemaRepositoryInterface) (resource.Supplier, error) {
|
||||
chainSupplier := resource.NewChainSupplier()
|
||||
for _, config := range configs {
|
||||
if !IsSupplierSupported(config.Key) {
|
||||
|
@ -39,7 +40,7 @@ func GetIACSupplier(configs []config.SupplierConfig, library *terraform.Provider
|
|||
var err error
|
||||
switch config.Key {
|
||||
case state.TerraformStateReaderSupplier:
|
||||
supplier, err = state.NewReader(config, library, backendOpts, resourceSchemaRepository)
|
||||
supplier, err = state.NewReader(config, library, backendOpts, progress, resourceSchemaRepository)
|
||||
default:
|
||||
return nil, errors.Errorf("Unsupported supplier '%s'", config.Key)
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/terraform/state/backend"
|
||||
"github.com/cloudskiff/driftctl/pkg/output"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test/resource"
|
||||
)
|
||||
|
@ -83,8 +84,12 @@ func TestGetIACSupplier(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
progress := &output.MockProgress{}
|
||||
progress.On("Start").Return().Times(1)
|
||||
|
||||
repo := resource.InitFakeSchemaRepository("aws", "3.19.0")
|
||||
_, err := GetIACSupplier(tt.args.config, terraform.NewProviderLibrary(), tt.args.options, repo)
|
||||
|
||||
_, err := GetIACSupplier(tt.args.config, terraform.NewProviderLibrary(), tt.args.options, progress, repo)
|
||||
if tt.wantErr != nil && err.Error() != tt.wantErr.Error() {
|
||||
t.Errorf("GetIACSupplier() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
|
@ -100,6 +105,7 @@ func TestGetSupportedSchemes(t *testing.T) {
|
|||
"tfstate+s3://",
|
||||
"tfstate+http://",
|
||||
"tfstate+https://",
|
||||
"tfstate+tfcloud://",
|
||||
}
|
||||
|
||||
if got := GetSupportedSchemes(); !reflect.DeepEqual(got, want) {
|
||||
|
|
|
@ -3,6 +3,7 @@ package backend
|
|||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
"github.com/pkg/errors"
|
||||
|
@ -13,12 +14,14 @@ var supportedBackends = []string{
|
|||
BackendKeyS3,
|
||||
BackendKeyHTTP,
|
||||
BackendKeyHTTPS,
|
||||
BackendKeyTFCloud,
|
||||
}
|
||||
|
||||
type Backend io.ReadCloser
|
||||
|
||||
type Options struct {
|
||||
Headers map[string]string
|
||||
Headers map[string]string
|
||||
TFCloudToken string
|
||||
}
|
||||
|
||||
func IsSupported(backend string) bool {
|
||||
|
@ -46,7 +49,9 @@ func GetBackend(config config.SupplierConfig, opts *Options) (Backend, error) {
|
|||
case BackendKeyHTTP:
|
||||
fallthrough
|
||||
case BackendKeyHTTPS:
|
||||
return NewHTTPReader(fmt.Sprintf("%s://%s", config.Backend, config.Path), opts)
|
||||
return NewHTTPReader(&http.Client{}, fmt.Sprintf("%s://%s", config.Backend, config.Path), opts)
|
||||
case BackendKeyTFCloud:
|
||||
return NewTFCloudReader(&http.Client{}, config.Path, opts)
|
||||
default:
|
||||
return nil, errors.Errorf("Unsupported backend '%s'", backend)
|
||||
}
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
package backend
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
pkghttp "github.com/cloudskiff/driftctl/pkg/http"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
const BackendKeyHTTP = "http"
|
||||
const BackendKeyHTTPS = "https"
|
||||
|
||||
type HTTPBackend struct {
|
||||
url string
|
||||
reader io.ReadCloser
|
||||
request *http.Request
|
||||
client pkghttp.HTTPClient
|
||||
reader io.ReadCloser
|
||||
}
|
||||
|
||||
func NewHTTPReader(rawURL string, opts *Options) (*HTTPBackend, error) {
|
||||
func NewHTTPReader(client pkghttp.HTTPClient, rawURL string, opts *Options) (*HTTPBackend, error) {
|
||||
req, err := http.NewRequest(http.MethodGet, rawURL, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -27,30 +28,23 @@ func NewHTTPReader(rawURL string, opts *Options) (*HTTPBackend, error) {
|
|||
req.Header.Add(key, value)
|
||||
}
|
||||
|
||||
client := &http.Client{}
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
_, err = buf.ReadFrom(res.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
logrus.WithFields(logrus.Fields{"body": buf.String()}).Trace("HTTP(s) backend response")
|
||||
|
||||
if res.StatusCode < 200 || res.StatusCode >= 400 {
|
||||
return nil, errors.Errorf("error requesting HTTP(s) backend state: status code: %d", res.StatusCode)
|
||||
}
|
||||
|
||||
return &HTTPBackend{rawURL, res.Body}, nil
|
||||
return &HTTPBackend{req, client, nil}, nil
|
||||
}
|
||||
|
||||
func (h *HTTPBackend) Read(p []byte) (n int, err error) {
|
||||
if h.reader == nil {
|
||||
return 0, errors.New("Reader not initialized")
|
||||
res, err := h.client.Do(h.request)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
h.reader = res.Body
|
||||
|
||||
if res.StatusCode < 200 || res.StatusCode >= 400 {
|
||||
body, _ := io.ReadAll(h.reader)
|
||||
logrus.WithFields(logrus.Fields{"body": string(body)}).Trace("HTTP(s) backend response")
|
||||
|
||||
return 0, errors.Errorf("error requesting HTTP(s) backend state: status code: %d", res.StatusCode)
|
||||
}
|
||||
}
|
||||
return h.reader.Read(p)
|
||||
}
|
||||
|
|
|
@ -3,22 +3,25 @@ package backend
|
|||
import (
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
pkghttp "github.com/cloudskiff/driftctl/pkg/http"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
func TestNewHTTPReader(t *testing.T) {
|
||||
func TestHTTPBackend_Read(t *testing.T) {
|
||||
type args struct {
|
||||
url string
|
||||
options *Options
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantURL string
|
||||
wantErr error
|
||||
name string
|
||||
args args
|
||||
wantErr error
|
||||
httpClient pkghttp.HTTPClient
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
name: "Should fail with wrong URL",
|
||||
|
@ -28,37 +31,76 @@ func TestNewHTTPReader(t *testing.T) {
|
|||
Headers: map[string]string{},
|
||||
},
|
||||
},
|
||||
wantURL: "",
|
||||
wantErr: errors.New("Get \"wrong_url\": unsupported protocol scheme \"\""),
|
||||
httpClient: func() pkghttp.HTTPClient {
|
||||
return &http.Client{}
|
||||
}(),
|
||||
expected: "",
|
||||
},
|
||||
{
|
||||
name: "Should fetch URL with auth header",
|
||||
args: args{
|
||||
url: "https://raw.githubusercontent.com/cloudskiff/driftctl/main/.dockerignore",
|
||||
url: "https://example.com/cloudskiff/driftctl/main/terraform.tfstate",
|
||||
options: &Options{
|
||||
Headers: map[string]string{
|
||||
"Authorization": "Basic Test",
|
||||
},
|
||||
},
|
||||
},
|
||||
wantURL: "https://raw.githubusercontent.com/cloudskiff/driftctl/main/.dockerignore",
|
||||
wantErr: nil,
|
||||
httpClient: func() pkghttp.HTTPClient {
|
||||
m := &pkghttp.MockHTTPClient{}
|
||||
|
||||
req, _ := http.NewRequest(http.MethodGet, "https://example.com/cloudskiff/driftctl/main/terraform.tfstate", nil)
|
||||
|
||||
req.Header.Add("Authorization", "Basic Test")
|
||||
|
||||
bodyReader := strings.NewReader("{}")
|
||||
bodyReadCloser := io.NopCloser(bodyReader)
|
||||
|
||||
m.On("Do", req).Return(&http.Response{
|
||||
StatusCode: 200,
|
||||
Body: bodyReadCloser,
|
||||
}, nil)
|
||||
|
||||
return m
|
||||
}(),
|
||||
expected: "{}",
|
||||
},
|
||||
{
|
||||
name: "Should fail with bad status code",
|
||||
args: args{
|
||||
url: "https://raw.githubusercontent.com/cloudskiff/driftctl-test/main/.dockerignore",
|
||||
url: "https://example.com/cloudskiff/driftctl/main/terraform.tfstate",
|
||||
options: &Options{
|
||||
Headers: map[string]string{},
|
||||
},
|
||||
},
|
||||
wantURL: "https://raw.githubusercontent.com/cloudskiff/driftctl-badprojecturl",
|
||||
wantErr: errors.New("error requesting HTTP(s) backend state: status code: 404"),
|
||||
httpClient: func() pkghttp.HTTPClient {
|
||||
m := &pkghttp.MockHTTPClient{}
|
||||
|
||||
req, _ := http.NewRequest(http.MethodGet, "https://example.com/cloudskiff/driftctl/main/terraform.tfstate", nil)
|
||||
|
||||
bodyReader := strings.NewReader("test")
|
||||
bodyReadCloser := io.NopCloser(bodyReader)
|
||||
|
||||
m.On("Do", req).Return(&http.Response{
|
||||
StatusCode: 404,
|
||||
Body: bodyReadCloser,
|
||||
}, nil)
|
||||
|
||||
return m
|
||||
}(),
|
||||
expected: "test",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := NewHTTPReader(tt.args.url, tt.args.options)
|
||||
reader, err := NewHTTPReader(tt.httpClient, tt.args.url, tt.args.options)
|
||||
assert.NoError(t, err)
|
||||
|
||||
got := make([]byte, len(tt.expected))
|
||||
_, err = reader.Read(got)
|
||||
if tt.wantErr != nil {
|
||||
assert.EqualError(t, err, tt.wantErr.Error())
|
||||
return
|
||||
|
@ -66,15 +108,15 @@ func TestNewHTTPReader(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
}
|
||||
assert.NotNil(t, got)
|
||||
assert.Equal(t, tt.wantURL, got.url)
|
||||
assert.Equal(t, tt.expected, string(got))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestHTTPBackend_Close(t *testing.T) {
|
||||
type fields struct {
|
||||
url string
|
||||
reader func() io.ReadCloser
|
||||
req *http.Request
|
||||
reader io.ReadCloser
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
|
@ -84,22 +126,22 @@ func TestHTTPBackend_Close(t *testing.T) {
|
|||
{
|
||||
name: "should fail to close reader",
|
||||
fields: fields{
|
||||
url: "",
|
||||
req: &http.Request{},
|
||||
reader: func() io.ReadCloser {
|
||||
return nil
|
||||
},
|
||||
}(),
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "should close reader",
|
||||
fields: fields{
|
||||
url: "",
|
||||
req: &http.Request{},
|
||||
reader: func() io.ReadCloser {
|
||||
m := &MockReaderMock{}
|
||||
m.On("Close").Return(nil)
|
||||
return m
|
||||
},
|
||||
}(),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
|
@ -107,8 +149,8 @@ func TestHTTPBackend_Close(t *testing.T) {
|
|||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
h := &HTTPBackend{
|
||||
url: tt.fields.url,
|
||||
reader: tt.fields.reader(),
|
||||
request: tt.fields.req,
|
||||
reader: tt.fields.reader,
|
||||
}
|
||||
if err := h.Close(); (err != nil) != tt.wantErr {
|
||||
t.Errorf("Close() error = %v, wantErr %v", err, tt.wantErr)
|
||||
|
@ -116,73 +158,3 @@ func TestHTTPBackend_Close(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestHTTPBackend_Read(t *testing.T) {
|
||||
type fields struct {
|
||||
url string
|
||||
reader func() io.ReadCloser
|
||||
}
|
||||
type args struct {
|
||||
p []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
fields fields
|
||||
args args
|
||||
wantN int
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "should fail to read because of nil reader",
|
||||
fields: fields{
|
||||
url: "",
|
||||
reader: func() io.ReadCloser {
|
||||
return nil
|
||||
},
|
||||
},
|
||||
wantErr: errors.New("Reader not initialized"),
|
||||
},
|
||||
{
|
||||
name: "should fail to read",
|
||||
fields: fields{
|
||||
url: "",
|
||||
reader: func() io.ReadCloser {
|
||||
m := &MockReaderMock{}
|
||||
m.On("Read", mock.Anything).Return(0, errors.New("test"))
|
||||
return m
|
||||
},
|
||||
},
|
||||
wantErr: errors.New("test"),
|
||||
},
|
||||
{
|
||||
name: "should read",
|
||||
fields: fields{
|
||||
url: "",
|
||||
reader: func() io.ReadCloser {
|
||||
m := &MockReaderMock{}
|
||||
m.On("Read", mock.Anything).Return(0, nil)
|
||||
return m
|
||||
},
|
||||
},
|
||||
wantErr: nil,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
h := &HTTPBackend{
|
||||
url: tt.fields.url,
|
||||
reader: tt.fields.reader(),
|
||||
}
|
||||
gotN, err := h.Read(tt.args.p)
|
||||
|
||||
if tt.wantErr != nil {
|
||||
assert.EqualError(t, err, tt.wantErr.Error())
|
||||
} else {
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
if gotN != tt.wantN {
|
||||
t.Errorf("Read() gotN = %v, want %v", gotN, tt.wantN)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,13 +8,12 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -70,8 +69,8 @@ func TestNewS3Reader(t *testing.T) {
|
|||
|
||||
func TestS3Backend_ReadWithError(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
fakeS3 := &mocks.FakeS3{}
|
||||
fakeErr := &mocks.FakeRequestFailure{}
|
||||
fakeS3 := &awstest.MockFakeS3{}
|
||||
fakeErr := &awstest.MockFakeRequestFailure{}
|
||||
fakeErr.On("Message").Return("Request failed on aws side")
|
||||
fakeS3.On("GetObject", mock.Anything).Return(nil, fakeErr)
|
||||
|
||||
|
@ -88,7 +87,7 @@ func TestS3Backend_ReadWithError(t *testing.T) {
|
|||
|
||||
func TestS3Backend_Read(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
fakeS3 := &mocks.FakeS3{}
|
||||
fakeS3 := &awstest.MockFakeS3{}
|
||||
fakeResponse, _ := os.Open("testdata/valid.tfstate")
|
||||
defer fakeResponse.Close()
|
||||
fakeS3.On("GetObject", &s3.GetObjectInput{
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
package backend
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
pkghttp "github.com/cloudskiff/driftctl/pkg/http"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
const BackendKeyTFCloud = "tfcloud"
|
||||
const TFCloudAPI = "https://app.terraform.io/api/v2"
|
||||
|
||||
type TFCloudAttributes struct {
|
||||
HostedStateDownloadUrl string `json:"hosted-state-download-url"`
|
||||
}
|
||||
|
||||
type TFCloudData struct {
|
||||
Attributes TFCloudAttributes `json:"attributes"`
|
||||
}
|
||||
|
||||
type TFCloudBody struct {
|
||||
Data TFCloudData `json:"data"`
|
||||
}
|
||||
|
||||
func NewTFCloudReader(client pkghttp.HTTPClient, workspaceId string, opts *Options) (*HTTPBackend, error) {
|
||||
req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/workspaces/%s/current-state-version", TFCloudAPI, workspaceId), nil)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.Header.Add("Content-Type", "application/vnd.api+json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", opts.TFCloudToken))
|
||||
|
||||
res, err := client.Do(req)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if res.StatusCode < 200 || res.StatusCode >= 400 {
|
||||
return nil, errors.Errorf("error requesting terraform cloud backend state: status code: %d", res.StatusCode)
|
||||
}
|
||||
|
||||
bodyBytes, _ := ioutil.ReadAll(res.Body)
|
||||
|
||||
body := TFCloudBody{}
|
||||
err = json.Unmarshal(bodyBytes, &body)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rawURL := body.Data.Attributes.HostedStateDownloadUrl
|
||||
logrus.WithFields(logrus.Fields{"hosted-state-download-url": rawURL}).Trace("Terraform Cloud backend response")
|
||||
|
||||
opt := Options{}
|
||||
return NewHTTPReader(client, rawURL, &opt)
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
package backend
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/jarcoal/httpmock"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestNewTFCloudReader(t *testing.T) {
|
||||
httpmock.Activate()
|
||||
defer httpmock.DeactivateAndReset()
|
||||
type args struct {
|
||||
workspaceId string
|
||||
options *Options
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
url string
|
||||
wantURL string
|
||||
wantErr error
|
||||
mock func()
|
||||
}{
|
||||
{
|
||||
name: "Should fetch URL with auth header",
|
||||
args: args{
|
||||
workspaceId: "workspaceId",
|
||||
options: &Options{
|
||||
TFCloudToken: "TOKEN",
|
||||
},
|
||||
},
|
||||
url: "https://app.terraform.io/api/v2/workspaces/workspaceId/current-state-version",
|
||||
wantURL: "https://archivist.terraform.io/v1/object/test",
|
||||
wantErr: nil,
|
||||
mock: func() {
|
||||
httpmock.Reset()
|
||||
httpmock.RegisterResponder(
|
||||
"GET",
|
||||
"https://app.terraform.io/api/v2/workspaces/workspaceId/current-state-version",
|
||||
httpmock.NewBytesResponder(http.StatusOK, []byte(`{"data":{"attributes":{"hosted-state-download-url":"https://archivist.terraform.io/v1/object/test"}}}`)),
|
||||
)
|
||||
httpmock.RegisterResponder(
|
||||
"GET",
|
||||
"https://archivist.terraform.io/v1/object/test",
|
||||
httpmock.NewBytesResponder(http.StatusOK, []byte(`{}`)),
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Should fail with wrong workspaceId",
|
||||
args: args{
|
||||
workspaceId: "wrong_workspaceId",
|
||||
options: &Options{
|
||||
TFCloudToken: "TOKEN",
|
||||
},
|
||||
},
|
||||
url: "https://app.terraform.io/api/v2/workspaces/wrong_workspaceId/current-state-version",
|
||||
wantURL: "",
|
||||
mock: func() {
|
||||
httpmock.Reset()
|
||||
httpmock.RegisterResponder(
|
||||
"GET",
|
||||
"https://app.terraform.io/api/v2/workspaces/wrong_workspaceId/current-state-version",
|
||||
httpmock.NewBytesResponder(http.StatusNotFound, []byte{}),
|
||||
)
|
||||
},
|
||||
wantErr: errors.New("error requesting terraform cloud backend state: status code: 404"),
|
||||
},
|
||||
{
|
||||
name: "Should fail with bad authentication token",
|
||||
args: args{
|
||||
workspaceId: "workspaceId",
|
||||
options: &Options{
|
||||
TFCloudToken: "TOKEN",
|
||||
},
|
||||
},
|
||||
url: "https://app.terraform.io/api/v2/workspaces/workspaceId/current-state-version",
|
||||
wantURL: "",
|
||||
mock: func() {
|
||||
httpmock.Reset()
|
||||
httpmock.RegisterResponder(
|
||||
"GET",
|
||||
"https://app.terraform.io/api/v2/workspaces/workspaceId/current-state-version",
|
||||
httpmock.NewBytesResponder(http.StatusUnauthorized, []byte{}),
|
||||
)
|
||||
},
|
||||
wantErr: errors.New("error requesting terraform cloud backend state: status code: 401"),
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
tt.mock()
|
||||
got, err := NewTFCloudReader(&http.Client{}, tt.args.workspaceId, tt.args.options)
|
||||
if tt.wantErr != nil {
|
||||
assert.EqualError(t, err, tt.wantErr.Error())
|
||||
return
|
||||
} else {
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
assert.NotNil(t, got)
|
||||
assert.Equal(t, tt.wantURL, got.request.URL.String())
|
||||
})
|
||||
}
|
||||
}
|
|
@ -1,10 +1,8 @@
|
|||
package enumerator
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
)
|
||||
|
@ -24,58 +22,35 @@ func NewFileEnumerator(config config.SupplierConfig) *FileEnumerator {
|
|||
}
|
||||
}
|
||||
|
||||
// File enumeration does not follow symlinks.
|
||||
// We may use something like this https://pkg.go.dev/github.com/facebookgo/symwalk
|
||||
// to follow links, but it allows infinite loop so be careful !
|
||||
// If a symlink is given as root path, we will follow it, but symlinks under this path
|
||||
// will not be resolved.
|
||||
func (s *FileEnumerator) Enumerate() ([]string, error) {
|
||||
path := s.config.Path
|
||||
|
||||
info, err := os.Lstat(path)
|
||||
if err != nil {
|
||||
if isGlob := HasMeta(path); !isGlob && err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err == nil {
|
||||
// if we got a symlink, use its destination
|
||||
if info.Mode()&os.ModeSymlink != 0 {
|
||||
destination, err := filepath.EvalSymlinks(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
path = destination
|
||||
info, err = os.Stat(destination)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// if we got a symlink, use its destination
|
||||
if info.Mode()&os.ModeSymlink != 0 {
|
||||
destination, err := filepath.EvalSymlinks(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
path = destination
|
||||
info, err = os.Stat(destination)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if info != nil && !info.IsDir() {
|
||||
return []string{path}, nil
|
||||
}
|
||||
|
||||
path = filepath.Join(path, "**/*.tfstate")
|
||||
}
|
||||
|
||||
if info != nil && !info.IsDir() {
|
||||
return []string{path}, nil
|
||||
}
|
||||
|
||||
keys := make([]string, 0)
|
||||
|
||||
err = filepath.WalkDir(path, func(path string, d fs.DirEntry, err error) error {
|
||||
// Not tested, we should remove a file or folder after WalkDir has enumerated the whole tree in memory
|
||||
// This edge case does not really need to be covered by tests
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Skip symlinks
|
||||
if d.Type()&os.ModeSymlink != 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Ignore .backup files generated by terraform
|
||||
if strings.HasSuffix(path, ".backup") {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !d.IsDir() {
|
||||
keys = append(keys, path)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
keys, err := Glob(path)
|
||||
|
||||
return keys, err
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestFileEnumerator_Enumerate(t *testing.T) {
|
||||
|
@ -20,9 +21,37 @@ func TestFileEnumerator_Enumerate(t *testing.T) {
|
|||
Path: "testdata/states",
|
||||
},
|
||||
want: []string{
|
||||
"testdata/states/route53/directory/route53.state",
|
||||
"testdata/states/s3/terraform.tfstate",
|
||||
"testdata/states/symlink.tfstate",
|
||||
"testdata/states/terraform.tfstate",
|
||||
"testdata/states/lambda/lambda.tfstate",
|
||||
"testdata/states/s3/terraform.tfstate",
|
||||
"testdata/states/symlink-to-s3-folder/terraform.tfstate",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "subfolder nesting glob",
|
||||
config: config.SupplierConfig{
|
||||
Path: "testdata/states/**/*.tfstate",
|
||||
},
|
||||
want: []string{
|
||||
"testdata/states/symlink.tfstate",
|
||||
"testdata/states/terraform.tfstate",
|
||||
"testdata/states/lambda/lambda.tfstate",
|
||||
"testdata/states/s3/terraform.tfstate",
|
||||
"testdata/states/symlink-to-s3-folder/terraform.tfstate",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "subfolder nesting glob upper directory",
|
||||
config: config.SupplierConfig{
|
||||
Path: "testdata/states/s3/../**/*.tfstate",
|
||||
},
|
||||
want: []string{
|
||||
"testdata/states/symlink.tfstate",
|
||||
"testdata/states/terraform.tfstate",
|
||||
"testdata/states/lambda/lambda.tfstate",
|
||||
"testdata/states/s3/terraform.tfstate",
|
||||
"testdata/states/symlink-to-s3-folder/terraform.tfstate",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -31,9 +60,11 @@ func TestFileEnumerator_Enumerate(t *testing.T) {
|
|||
Path: "testdata/symlink",
|
||||
},
|
||||
want: []string{
|
||||
"testdata/states/route53/directory/route53.state",
|
||||
"testdata/states/s3/terraform.tfstate",
|
||||
"testdata/states/symlink.tfstate",
|
||||
"testdata/states/terraform.tfstate",
|
||||
"testdata/states/lambda/lambda.tfstate",
|
||||
"testdata/states/s3/terraform.tfstate",
|
||||
"testdata/states/symlink-to-s3-folder/terraform.tfstate",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -75,12 +106,10 @@ func TestFileEnumerator_Enumerate(t *testing.T) {
|
|||
t.Run(tt.name, func(t *testing.T) {
|
||||
s := NewFileEnumerator(tt.config)
|
||||
got, err := s.Enumerate()
|
||||
if err != nil && err.Error() != tt.err {
|
||||
t.Fatalf("Expected error '%s', got '%s'", tt.err, err.Error())
|
||||
}
|
||||
if err != nil && tt.err == "" {
|
||||
t.Fatalf("Expected error '%s' but got nil", tt.err)
|
||||
return
|
||||
if tt.err != "" {
|
||||
assert.EqualError(t, err, tt.err)
|
||||
} else {
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
if !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("Enumerate() got = %v, want %v", got, tt.want)
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
package enumerator
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/bmatcuk/doublestar/v4"
|
||||
)
|
||||
|
||||
func GlobS3(path string) (prefix string, pattern string) {
|
||||
if !HasMeta(path) {
|
||||
return path, ""
|
||||
}
|
||||
prefix, pattern = splitDirPattern(path)
|
||||
return
|
||||
}
|
||||
|
||||
func HasMeta(path string) bool {
|
||||
magicChars := `?*[]`
|
||||
return strings.ContainsAny(path, magicChars)
|
||||
}
|
||||
|
||||
func splitDirPattern(p string) (base string, pattern string) {
|
||||
base = p
|
||||
sep := string(os.PathSeparator)
|
||||
|
||||
for {
|
||||
if !HasMeta(base) {
|
||||
break
|
||||
}
|
||||
if !strings.Contains(base, sep) {
|
||||
return "", base
|
||||
}
|
||||
base = base[:strings.LastIndex(base, sep)]
|
||||
}
|
||||
if len(base) == len(p) {
|
||||
return p, ""
|
||||
}
|
||||
return base, p[len(base)+1:]
|
||||
}
|
||||
|
||||
func Glob(pattern string) ([]string, error) {
|
||||
if !strings.Contains(pattern, "**") {
|
||||
return filepath.Glob(pattern)
|
||||
}
|
||||
|
||||
files, err := doublestar.Glob(os.DirFS("."), path.Clean(pattern))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return files, nil
|
||||
}
|
|
@ -1,14 +1,17 @@
|
|||
package enumerator
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/aws/aws-sdk-go/service/s3/s3iface"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/bmatcuk/doublestar/v4"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
)
|
||||
|
||||
type S3EnumeratorConfig struct {
|
||||
|
@ -36,10 +39,13 @@ func (s *S3Enumerator) Enumerate() ([]string, error) {
|
|||
if len(bucketPath) < 2 {
|
||||
return nil, errors.Errorf("Unable to parse S3 path: %s. Must be BUCKET_NAME/PREFIX", s.config.Path)
|
||||
}
|
||||
bucket := bucketPath[0]
|
||||
prefix := strings.Join(bucketPath[1:], "/")
|
||||
|
||||
keys := make([]string, 0)
|
||||
bucket := bucketPath[0]
|
||||
prefix, pattern := GlobS3(strings.Join(bucketPath[1:], "/"))
|
||||
|
||||
fullPattern := filepath.Join(prefix, pattern)
|
||||
|
||||
files := make([]string, 0)
|
||||
input := &s3.ListObjectsV2Input{
|
||||
Bucket: &bucket,
|
||||
Prefix: &prefix,
|
||||
|
@ -47,15 +53,17 @@ func (s *S3Enumerator) Enumerate() ([]string, error) {
|
|||
err := s.client.ListObjectsV2Pages(input, func(output *s3.ListObjectsV2Output, lastPage bool) bool {
|
||||
for _, metadata := range output.Contents {
|
||||
if aws.Int64Value(metadata.Size) > 0 {
|
||||
keys = append(keys, strings.Join([]string{bucket, *metadata.Key}, "/"))
|
||||
key := *metadata.Key
|
||||
if match, _ := doublestar.Match(fullPattern, key); match {
|
||||
files = append(files, filepath.Join(bucket, key))
|
||||
}
|
||||
}
|
||||
}
|
||||
return !lastPage
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return keys, nil
|
||||
return files, nil
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
|
||||
awssdk "github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
|
@ -16,16 +16,16 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
tests := []struct {
|
||||
name string
|
||||
config config.SupplierConfig
|
||||
mocks func(client *mocks.FakeS3)
|
||||
mocks func(client *awstest.MockFakeS3)
|
||||
want []string
|
||||
err string
|
||||
}{
|
||||
{
|
||||
name: "test results are returned",
|
||||
name: "no test results are returned",
|
||||
config: config.SupplierConfig{
|
||||
Path: "bucket-name/a/nested/prefix",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
input := &s3.ListObjectsV2Input{
|
||||
Bucket: awssdk.String("bucket-name"),
|
||||
Prefix: awssdk.String("a/nested/prefix"),
|
||||
|
@ -57,11 +57,11 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state5"),
|
||||
Key: awssdk.String("a/nested/prefix/folder1/state5"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state6"),
|
||||
Key: awssdk.String("a/nested/prefix/folder2/subfolder1/state6"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
},
|
||||
|
@ -70,21 +70,66 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
}),
|
||||
).Return(nil)
|
||||
},
|
||||
want: []string{
|
||||
"bucket-name/a/nested/prefix/state1",
|
||||
"bucket-name/a/nested/prefix/state2",
|
||||
"bucket-name/a/nested/prefix/state3",
|
||||
"bucket-name/a/nested/prefix/state4",
|
||||
"bucket-name/a/nested/prefix/state5",
|
||||
"bucket-name/a/nested/prefix/state6",
|
||||
},
|
||||
want: []string{},
|
||||
},
|
||||
{
|
||||
name: "test that directories objects are filtered",
|
||||
name: "one test result is returned",
|
||||
config: config.SupplierConfig{
|
||||
Path: "bucket-name/a/nested/prefix",
|
||||
Path: "bucket-name/a/nested/prefix/state2",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
input := &s3.ListObjectsV2Input{
|
||||
Bucket: awssdk.String("bucket-name"),
|
||||
Prefix: awssdk.String("a/nested/prefix/state2"),
|
||||
}
|
||||
client.On(
|
||||
"ListObjectsV2Pages",
|
||||
input,
|
||||
mock.MatchedBy(func(callback func(res *s3.ListObjectsV2Output, lastPage bool) bool) bool {
|
||||
callback(&s3.ListObjectsV2Output{
|
||||
Contents: []*s3.Object{
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state1"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state2"),
|
||||
Size: awssdk.Int64(2),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state3"),
|
||||
Size: awssdk.Int64(1),
|
||||
},
|
||||
},
|
||||
}, false)
|
||||
callback(&s3.ListObjectsV2Output{
|
||||
Contents: []*s3.Object{
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state4"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/folder1/state5"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/folder2/subfolder1/state6"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
},
|
||||
}, true)
|
||||
return true
|
||||
}),
|
||||
).Return(nil)
|
||||
},
|
||||
want: []string{"bucket-name/a/nested/prefix/state2"},
|
||||
},
|
||||
{
|
||||
name: "test results with glob",
|
||||
config: config.SupplierConfig{
|
||||
Path: "bucket-name/a/nested/prefix/**/*.tfstate",
|
||||
},
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
input := &s3.ListObjectsV2Input{
|
||||
Bucket: awssdk.String("bucket-name"),
|
||||
Prefix: awssdk.String("a/nested/prefix"),
|
||||
|
@ -96,20 +141,32 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
callback(&s3.ListObjectsV2Output{
|
||||
Contents: []*s3.Object{
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state1"),
|
||||
Size: awssdk.Int64(0),
|
||||
Key: awssdk.String("a/nested/prefix/1/state1.tfstate"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state2"),
|
||||
Size: nil,
|
||||
Key: awssdk.String("a/nested/folder1/2/state2.tfstate"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state3"),
|
||||
Size: awssdk.Int64(-1),
|
||||
Key: awssdk.String("a/nested/prefix/state3.tfstate"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
},
|
||||
}, false)
|
||||
callback(&s3.ListObjectsV2Output{
|
||||
Contents: []*s3.Object{
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/4/4/state4.tfstate"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state4"),
|
||||
Size: awssdk.Int64(1),
|
||||
Key: awssdk.String("a/nested/state5.state"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state6.tfstate.backup"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
},
|
||||
}, true)
|
||||
|
@ -118,15 +175,71 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
).Return(nil)
|
||||
},
|
||||
want: []string{
|
||||
"bucket-name/a/nested/prefix/state4",
|
||||
"bucket-name/a/nested/prefix/1/state1.tfstate",
|
||||
"bucket-name/a/nested/prefix/state3.tfstate",
|
||||
"bucket-name/a/nested/prefix/4/4/state4.tfstate",
|
||||
},
|
||||
err: "",
|
||||
},
|
||||
{
|
||||
name: "test results with simple glob",
|
||||
config: config.SupplierConfig{
|
||||
Path: "bucket-name/a/nested/prefix/*.tfstate",
|
||||
},
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
input := &s3.ListObjectsV2Input{
|
||||
Bucket: awssdk.String("bucket-name"),
|
||||
Prefix: awssdk.String("a/nested/prefix"),
|
||||
}
|
||||
client.On(
|
||||
"ListObjectsV2Pages",
|
||||
input,
|
||||
mock.MatchedBy(func(callback func(res *s3.ListObjectsV2Output, lastPage bool) bool) bool {
|
||||
callback(&s3.ListObjectsV2Output{
|
||||
Contents: []*s3.Object{
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/1/state1.tfstate"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/2/state2.tfstate"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state3.tfstate"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
},
|
||||
}, false)
|
||||
callback(&s3.ListObjectsV2Output{
|
||||
Contents: []*s3.Object{
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/4/4/state4.tfstate"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state5.state"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
{
|
||||
Key: awssdk.String("a/nested/prefix/state6.tfstate.backup"),
|
||||
Size: awssdk.Int64(5),
|
||||
},
|
||||
},
|
||||
}, true)
|
||||
return true
|
||||
}),
|
||||
).Return(nil)
|
||||
},
|
||||
want: []string{"bucket-name/a/nested/prefix/state3.tfstate"},
|
||||
err: "",
|
||||
},
|
||||
{
|
||||
name: "test when invalid config used",
|
||||
config: config.SupplierConfig{
|
||||
Path: "bucket-name",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("ListObjectsV2Pages", mock.Anything, mock.Anything).Return(errors.New("error when listing"))
|
||||
},
|
||||
want: nil,
|
||||
|
@ -135,7 +248,7 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
{
|
||||
name: "test when empty config used",
|
||||
config: config.SupplierConfig{},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("ListObjectsV2Pages", mock.Anything, mock.Anything).Return(errors.New("error when listing"))
|
||||
},
|
||||
want: nil,
|
||||
|
@ -146,7 +259,7 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
config: config.SupplierConfig{
|
||||
Path: "bucket-name/a/nested/prefix",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("ListObjectsV2Pages", mock.Anything, mock.Anything).Return(errors.New("error when listing"))
|
||||
},
|
||||
want: nil,
|
||||
|
@ -155,7 +268,7 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
fakeS3 := mocks.FakeS3{}
|
||||
fakeS3 := awstest.MockFakeS3{}
|
||||
tt.mocks(&fakeS3)
|
||||
s := &S3Enumerator{
|
||||
config: tt.config,
|
||||
|
@ -164,8 +277,9 @@ func TestS3Enumerator_Enumerate(t *testing.T) {
|
|||
got, err := s.Enumerate()
|
||||
if err != nil && err.Error() != tt.err {
|
||||
t.Fatalf("Expected error '%s', got '%s'", tt.err, err.Error())
|
||||
return
|
||||
}
|
||||
if err != nil && tt.err == "" {
|
||||
if tt.err != "" && err == nil {
|
||||
t.Fatalf("Expected error '%s' but got nil", tt.err)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -3,14 +3,8 @@ package state
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/iac"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/terraform/state/backend"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/terraform/state/enumerator"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/deserializer"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/pkg/output"
|
||||
"github.com/fatih/color"
|
||||
"github.com/hashicorp/terraform/addrs"
|
||||
"github.com/hashicorp/terraform/states"
|
||||
"github.com/hashicorp/terraform/states/statefile"
|
||||
|
@ -18,6 +12,14 @@ import (
|
|||
"github.com/zclconf/go-cty/cty"
|
||||
ctyconvert "github.com/zclconf/go-cty/cty/convert"
|
||||
ctyjson "github.com/zclconf/go-cty/cty/json"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/iac"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/config"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/terraform/state/backend"
|
||||
"github.com/cloudskiff/driftctl/pkg/iac/terraform/state/enumerator"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/deserializer"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
)
|
||||
|
||||
const TerraformStateReaderSupplier = "tfstate"
|
||||
|
@ -29,6 +31,7 @@ type TerraformStateReader struct {
|
|||
enumerator enumerator.StateEnumerator
|
||||
deserializers []deserializer.CTYDeserializer
|
||||
backendOptions *backend.Options
|
||||
progress output.Progress
|
||||
resourceSchemaRepository resource.SchemaRepositoryInterface
|
||||
}
|
||||
|
||||
|
@ -37,8 +40,8 @@ func (r *TerraformStateReader) initReader() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func NewReader(config config.SupplierConfig, library *terraform.ProviderLibrary, backendOpts *backend.Options, resourceSchemaRepository resource.SchemaRepositoryInterface) (*TerraformStateReader, error) {
|
||||
reader := TerraformStateReader{library: library, config: config, deserializers: iac.Deserializers(), backendOptions: backendOpts, resourceSchemaRepository: resourceSchemaRepository}
|
||||
func NewReader(config config.SupplierConfig, library *terraform.ProviderLibrary, backendOpts *backend.Options, progress output.Progress, resourceSchemaRepository resource.SchemaRepositoryInterface) (*TerraformStateReader, error) {
|
||||
reader := TerraformStateReader{library: library, config: config, deserializers: iac.Deserializers(), backendOptions: backendOpts, progress: progress, resourceSchemaRepository: resourceSchemaRepository}
|
||||
err := reader.initReader()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -53,7 +56,7 @@ func (r *TerraformStateReader) retrieve() (map[string][]cty.Value, error) {
|
|||
}
|
||||
r.backend = b
|
||||
|
||||
state, err := read(r.backend)
|
||||
state, err := read(r.config.Path, r.backend)
|
||||
defer r.backend.Close()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -213,7 +216,6 @@ func (r *TerraformStateReader) decode(values map[string][]cty.Value) ([]resource
|
|||
}
|
||||
|
||||
func (r *TerraformStateReader) Resources() ([]resource.Resource, error) {
|
||||
|
||||
if r.enumerator == nil {
|
||||
return r.retrieveForState(r.config.Path)
|
||||
}
|
||||
|
@ -227,6 +229,7 @@ func (r *TerraformStateReader) retrieveForState(path string) ([]resource.Resourc
|
|||
"path": r.config.Path,
|
||||
"backend": r.config.Backend,
|
||||
}).Debug("Reading resources from state")
|
||||
r.progress.Inc()
|
||||
values, err := r.retrieve()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -247,6 +250,11 @@ func (r *TerraformStateReader) retrieveMultiplesStates() ([]resource.Resource, e
|
|||
for _, key := range keys {
|
||||
resources, err := r.retrieveForState(key)
|
||||
if err != nil {
|
||||
if _, ok := err.(*UnsupportedVersionError); ok {
|
||||
color.New(color.Bold, color.FgYellow).Printf("WARNING: %s\n", err)
|
||||
continue
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
results = append(results, resources...)
|
||||
|
@ -255,18 +263,31 @@ func (r *TerraformStateReader) retrieveMultiplesStates() ([]resource.Resource, e
|
|||
return results, nil
|
||||
}
|
||||
|
||||
func read(reader backend.Backend) (*states.State, error) {
|
||||
state, err := readState(reader)
|
||||
func read(path string, reader backend.Backend) (*states.State, error) {
|
||||
state, err := readState(path, reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return state, nil
|
||||
}
|
||||
|
||||
func readState(reader backend.Backend) (*states.State, error) {
|
||||
func readState(path string, reader backend.Backend) (*states.State, error) {
|
||||
state, err := statefile.Read(reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
supported, err := IsVersionSupported(state.TerraformVersion.String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !supported {
|
||||
return nil, &UnsupportedVersionError{
|
||||
StateFile: path,
|
||||
Version: state.TerraformVersion,
|
||||
}
|
||||
}
|
||||
|
||||
return state.State, nil
|
||||
}
|
||||
|
|
|
@ -7,6 +7,9 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/output"
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
resourcegithub "github.com/cloudskiff/driftctl/pkg/resource/github"
|
||||
|
@ -26,7 +29,7 @@ import (
|
|||
|
||||
func TestReadStateValid(t *testing.T) {
|
||||
reader, _ := os.Open("testdata/v4/valid.tfstate")
|
||||
_, err := readState(reader)
|
||||
_, err := readState("terraform.tfstate", reader)
|
||||
if err != nil {
|
||||
t.Errorf("Unable to read state, %s", err)
|
||||
return
|
||||
|
@ -35,7 +38,7 @@ func TestReadStateValid(t *testing.T) {
|
|||
|
||||
func TestReadStateInvalid(t *testing.T) {
|
||||
reader, _ := os.Open("testdata/v4/invalid.tfstate")
|
||||
state, err := readState(reader)
|
||||
state, err := readState("terraform.tfstate", reader)
|
||||
if err == nil || state != nil {
|
||||
t.Errorf("ReadFile invalid state should return error")
|
||||
}
|
||||
|
@ -96,14 +99,16 @@ func TestTerraformStateReader_AWS_Resources(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
progress := &output.MockProgress{}
|
||||
progress.On("Inc").Return().Times(1)
|
||||
progress.On("Stop").Return().Times(1)
|
||||
|
||||
shouldUpdate := tt.dirName == *goldenfile.Update
|
||||
|
||||
var realProvider *aws.AWSTerraformProvider
|
||||
|
||||
if shouldUpdate {
|
||||
var err error
|
||||
progress := &output.MockProgress{}
|
||||
progress.On("Inc").Return()
|
||||
realProvider, err = aws.NewAWSTerraformProvider(progress)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@ -127,6 +132,7 @@ func TestTerraformStateReader_AWS_Resources(t *testing.T) {
|
|||
},
|
||||
library: library,
|
||||
deserializers: iac.Deserializers(),
|
||||
progress: progress,
|
||||
resourceSchemaRepository: repo,
|
||||
}
|
||||
|
||||
|
@ -177,14 +183,16 @@ func TestTerraformStateReader_Github_Resources(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
progress := &output.MockProgress{}
|
||||
progress.On("Inc").Return().Times(1)
|
||||
progress.On("Stop").Return().Times(1)
|
||||
|
||||
shouldUpdate := tt.dirName == *goldenfile.Update
|
||||
|
||||
var realProvider *github.GithubTerraformProvider
|
||||
|
||||
if shouldUpdate {
|
||||
var err error
|
||||
progress := &output.MockProgress{}
|
||||
progress.On("Inc").Return()
|
||||
realProvider, err = github.NewGithubTerraformProvider(progress)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@ -208,6 +216,7 @@ func TestTerraformStateReader_Github_Resources(t *testing.T) {
|
|||
},
|
||||
library: library,
|
||||
deserializers: iac.Deserializers(),
|
||||
progress: progress,
|
||||
resourceSchemaRepository: repo,
|
||||
}
|
||||
|
||||
|
@ -255,3 +264,41 @@ func convert(got []resource.Resource) []interface{} {
|
|||
}
|
||||
return want
|
||||
}
|
||||
|
||||
func TestTerraformStateReader_VersionSupported(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
statePath string
|
||||
err error
|
||||
}{
|
||||
{
|
||||
name: "should detect unsupported version",
|
||||
statePath: "testdata/v4/unsupported_version.tfstate",
|
||||
err: errors.New("terraform.tfstate was generated using Terraform 0.10.26 which is currently not supported by driftctl. Please read documentation at https://docs.driftctl.com/limitations"),
|
||||
},
|
||||
{
|
||||
name: "should detect supported version",
|
||||
statePath: "testdata/v4/supported_version.tfstate",
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "should return invalid version error",
|
||||
statePath: "testdata/v4/invalid_version.tfstate",
|
||||
err: errors.New("Invalid Terraform version string: State file claims to have been written by Terraform version \"invalid\", which is not a valid version string."),
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
reader, err := os.Open(test.statePath)
|
||||
assert.NoError(t, err)
|
||||
|
||||
_, err = readState("terraform.tfstate", reader)
|
||||
if test.err != nil {
|
||||
assert.EqualError(t, err, test.err.Error())
|
||||
} else {
|
||||
assert.Equal(t, test.err, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,171 @@
|
|||
{
|
||||
"version": 4,
|
||||
"terraform_version": "invalid",
|
||||
"serial": 72,
|
||||
"lineage": "d64a9976-0aa7-980f-8ea8-4056102e13c7",
|
||||
"outputs": {
|
||||
"public_ip": {
|
||||
"value": "15.236.123.61",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "data",
|
||||
"type": "aws_ami",
|
||||
"name": "amazon-linux",
|
||||
"provider": "provider.aws",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"architecture": "x86_64",
|
||||
"arn": "arn:aws:ec2:eu-west-3::image/ami-0aa9ac13698fff547",
|
||||
"block_device_mappings": [
|
||||
{
|
||||
"device_name": "/dev/xvda",
|
||||
"ebs": {
|
||||
"delete_on_termination": "true",
|
||||
"encrypted": "false",
|
||||
"iops": "0",
|
||||
"snapshot_id": "snap-03857d0bd1aa43efd",
|
||||
"volume_size": "8",
|
||||
"volume_type": "gp2"
|
||||
},
|
||||
"no_device": "",
|
||||
"virtual_name": ""
|
||||
}
|
||||
],
|
||||
"creation_date": "2020-07-21T18:33:16.000Z",
|
||||
"description": "Amazon Linux AMI 2018.03.0.20200716.0 x86_64 HVM gp2",
|
||||
"executable_users": null,
|
||||
"filter": [
|
||||
{
|
||||
"name": "name",
|
||||
"values": [
|
||||
"amzn-ami-hvm-*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hypervisor": "xen",
|
||||
"id": "ami-0aa9ac13698fff547",
|
||||
"image_id": "ami-0aa9ac13698fff547",
|
||||
"image_location": "amazon/amzn-ami-hvm-2018.03.0.20200716.0-x86_64-gp2",
|
||||
"image_owner_alias": "amazon",
|
||||
"image_type": "machine",
|
||||
"kernel_id": null,
|
||||
"most_recent": true,
|
||||
"name": "amzn-ami-hvm-2018.03.0.20200716.0-x86_64-gp2",
|
||||
"name_regex": null,
|
||||
"owner_id": "137112412989",
|
||||
"owners": [
|
||||
"amazon"
|
||||
],
|
||||
"platform": null,
|
||||
"product_codes": [],
|
||||
"public": true,
|
||||
"ramdisk_id": null,
|
||||
"root_device_name": "/dev/xvda",
|
||||
"root_device_type": "ebs",
|
||||
"root_snapshot_id": "snap-03857d0bd1aa43efd",
|
||||
"sriov_net_support": "simple",
|
||||
"state": "available",
|
||||
"state_reason": {
|
||||
"code": "UNSET",
|
||||
"message": "UNSET"
|
||||
},
|
||||
"tags": {},
|
||||
"virtualization_type": "hvm"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "aws_instance",
|
||||
"name": "vm",
|
||||
"provider": "provider.aws",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 1,
|
||||
"attributes": {
|
||||
"ami": "ami-0aa9ac13698fff547",
|
||||
"arn": "arn:aws:ec2:eu-west-3:929327065333:instance/i-07dbbae1c3fc4c194",
|
||||
"associate_public_ip_address": true,
|
||||
"availability_zone": "eu-west-3b",
|
||||
"cpu_core_count": 1,
|
||||
"cpu_threads_per_core": 2,
|
||||
"credit_specification": [
|
||||
{
|
||||
"cpu_credits": "unlimited"
|
||||
}
|
||||
],
|
||||
"disable_api_termination": false,
|
||||
"ebs_block_device": [],
|
||||
"ebs_optimized": false,
|
||||
"ephemeral_block_device": [],
|
||||
"get_password_data": false,
|
||||
"hibernation": false,
|
||||
"host_id": null,
|
||||
"iam_instance_profile": "",
|
||||
"id": "i-07dbbae1c3fc4c194",
|
||||
"instance_initiated_shutdown_behavior": null,
|
||||
"instance_state": "running",
|
||||
"instance_type": "t3.nano",
|
||||
"ipv6_address_count": 0,
|
||||
"ipv6_addresses": [],
|
||||
"key_name": "",
|
||||
"metadata_options": [
|
||||
{
|
||||
"http_endpoint": "enabled",
|
||||
"http_put_response_hop_limit": 1,
|
||||
"http_tokens": "optional"
|
||||
}
|
||||
],
|
||||
"monitoring": false,
|
||||
"network_interface": [],
|
||||
"network_interface_id": null,
|
||||
"outpost_arn": "",
|
||||
"password_data": "",
|
||||
"placement_group": "",
|
||||
"primary_network_interface_id": "eni-0e489fe405754f162",
|
||||
"private_dns": "ip-172-31-16-40.eu-west-3.compute.internal",
|
||||
"private_ip": "172.31.16.40",
|
||||
"public_dns": "ec2-15-236-123-61.eu-west-3.compute.amazonaws.com",
|
||||
"public_ip": "15.236.123.61",
|
||||
"root_block_device": [
|
||||
{
|
||||
"delete_on_termination": true,
|
||||
"device_name": "/dev/xvda",
|
||||
"encrypted": false,
|
||||
"iops": 100,
|
||||
"kms_key_id": "",
|
||||
"volume_id": "vol-0d30c5228ef04fe70",
|
||||
"volume_size": 8,
|
||||
"volume_type": "gp2"
|
||||
}
|
||||
],
|
||||
"security_groups": [
|
||||
"default"
|
||||
],
|
||||
"source_dest_check": true,
|
||||
"subnet_id": "subnet-49f9ae32",
|
||||
"tags": {
|
||||
"Name": "DEMO VM DESTROY ME - default",
|
||||
"Terraform": "true"
|
||||
},
|
||||
"tenancy": "default",
|
||||
"timeouts": null,
|
||||
"user_data": null,
|
||||
"user_data_base64": null,
|
||||
"volume_tags": {},
|
||||
"vpc_security_group_ids": [
|
||||
"sg-a74815c8"
|
||||
]
|
||||
},
|
||||
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ=="
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,171 @@
|
|||
{
|
||||
"version": 4,
|
||||
"terraform_version": "0.12.26",
|
||||
"serial": 72,
|
||||
"lineage": "d64a9976-0aa7-980f-8ea8-4056102e13c7",
|
||||
"outputs": {
|
||||
"public_ip": {
|
||||
"value": "15.236.123.61",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "data",
|
||||
"type": "aws_ami",
|
||||
"name": "amazon-linux",
|
||||
"provider": "provider.aws",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"architecture": "x86_64",
|
||||
"arn": "arn:aws:ec2:eu-west-3::image/ami-0aa9ac13698fff547",
|
||||
"block_device_mappings": [
|
||||
{
|
||||
"device_name": "/dev/xvda",
|
||||
"ebs": {
|
||||
"delete_on_termination": "true",
|
||||
"encrypted": "false",
|
||||
"iops": "0",
|
||||
"snapshot_id": "snap-03857d0bd1aa43efd",
|
||||
"volume_size": "8",
|
||||
"volume_type": "gp2"
|
||||
},
|
||||
"no_device": "",
|
||||
"virtual_name": ""
|
||||
}
|
||||
],
|
||||
"creation_date": "2020-07-21T18:33:16.000Z",
|
||||
"description": "Amazon Linux AMI 2018.03.0.20200716.0 x86_64 HVM gp2",
|
||||
"executable_users": null,
|
||||
"filter": [
|
||||
{
|
||||
"name": "name",
|
||||
"values": [
|
||||
"amzn-ami-hvm-*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hypervisor": "xen",
|
||||
"id": "ami-0aa9ac13698fff547",
|
||||
"image_id": "ami-0aa9ac13698fff547",
|
||||
"image_location": "amazon/amzn-ami-hvm-2018.03.0.20200716.0-x86_64-gp2",
|
||||
"image_owner_alias": "amazon",
|
||||
"image_type": "machine",
|
||||
"kernel_id": null,
|
||||
"most_recent": true,
|
||||
"name": "amzn-ami-hvm-2018.03.0.20200716.0-x86_64-gp2",
|
||||
"name_regex": null,
|
||||
"owner_id": "137112412989",
|
||||
"owners": [
|
||||
"amazon"
|
||||
],
|
||||
"platform": null,
|
||||
"product_codes": [],
|
||||
"public": true,
|
||||
"ramdisk_id": null,
|
||||
"root_device_name": "/dev/xvda",
|
||||
"root_device_type": "ebs",
|
||||
"root_snapshot_id": "snap-03857d0bd1aa43efd",
|
||||
"sriov_net_support": "simple",
|
||||
"state": "available",
|
||||
"state_reason": {
|
||||
"code": "UNSET",
|
||||
"message": "UNSET"
|
||||
},
|
||||
"tags": {},
|
||||
"virtualization_type": "hvm"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "aws_instance",
|
||||
"name": "vm",
|
||||
"provider": "provider.aws",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 1,
|
||||
"attributes": {
|
||||
"ami": "ami-0aa9ac13698fff547",
|
||||
"arn": "arn:aws:ec2:eu-west-3:929327065333:instance/i-07dbbae1c3fc4c194",
|
||||
"associate_public_ip_address": true,
|
||||
"availability_zone": "eu-west-3b",
|
||||
"cpu_core_count": 1,
|
||||
"cpu_threads_per_core": 2,
|
||||
"credit_specification": [
|
||||
{
|
||||
"cpu_credits": "unlimited"
|
||||
}
|
||||
],
|
||||
"disable_api_termination": false,
|
||||
"ebs_block_device": [],
|
||||
"ebs_optimized": false,
|
||||
"ephemeral_block_device": [],
|
||||
"get_password_data": false,
|
||||
"hibernation": false,
|
||||
"host_id": null,
|
||||
"iam_instance_profile": "",
|
||||
"id": "i-07dbbae1c3fc4c194",
|
||||
"instance_initiated_shutdown_behavior": null,
|
||||
"instance_state": "running",
|
||||
"instance_type": "t3.nano",
|
||||
"ipv6_address_count": 0,
|
||||
"ipv6_addresses": [],
|
||||
"key_name": "",
|
||||
"metadata_options": [
|
||||
{
|
||||
"http_endpoint": "enabled",
|
||||
"http_put_response_hop_limit": 1,
|
||||
"http_tokens": "optional"
|
||||
}
|
||||
],
|
||||
"monitoring": false,
|
||||
"network_interface": [],
|
||||
"network_interface_id": null,
|
||||
"outpost_arn": "",
|
||||
"password_data": "",
|
||||
"placement_group": "",
|
||||
"primary_network_interface_id": "eni-0e489fe405754f162",
|
||||
"private_dns": "ip-172-31-16-40.eu-west-3.compute.internal",
|
||||
"private_ip": "172.31.16.40",
|
||||
"public_dns": "ec2-15-236-123-61.eu-west-3.compute.amazonaws.com",
|
||||
"public_ip": "15.236.123.61",
|
||||
"root_block_device": [
|
||||
{
|
||||
"delete_on_termination": true,
|
||||
"device_name": "/dev/xvda",
|
||||
"encrypted": false,
|
||||
"iops": 100,
|
||||
"kms_key_id": "",
|
||||
"volume_id": "vol-0d30c5228ef04fe70",
|
||||
"volume_size": 8,
|
||||
"volume_type": "gp2"
|
||||
}
|
||||
],
|
||||
"security_groups": [
|
||||
"default"
|
||||
],
|
||||
"source_dest_check": true,
|
||||
"subnet_id": "subnet-49f9ae32",
|
||||
"tags": {
|
||||
"Name": "DEMO VM DESTROY ME - default",
|
||||
"Terraform": "true"
|
||||
},
|
||||
"tenancy": "default",
|
||||
"timeouts": null,
|
||||
"user_data": null,
|
||||
"user_data_base64": null,
|
||||
"volume_tags": {},
|
||||
"vpc_security_group_ids": [
|
||||
"sg-a74815c8"
|
||||
]
|
||||
},
|
||||
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ=="
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,171 @@
|
|||
{
|
||||
"version": 4,
|
||||
"terraform_version": "0.10.26",
|
||||
"serial": 72,
|
||||
"lineage": "d64a9976-0aa7-980f-8ea8-4056102e13c7",
|
||||
"outputs": {
|
||||
"public_ip": {
|
||||
"value": "15.236.123.61",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "data",
|
||||
"type": "aws_ami",
|
||||
"name": "amazon-linux",
|
||||
"provider": "provider.aws",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"architecture": "x86_64",
|
||||
"arn": "arn:aws:ec2:eu-west-3::image/ami-0aa9ac13698fff547",
|
||||
"block_device_mappings": [
|
||||
{
|
||||
"device_name": "/dev/xvda",
|
||||
"ebs": {
|
||||
"delete_on_termination": "true",
|
||||
"encrypted": "false",
|
||||
"iops": "0",
|
||||
"snapshot_id": "snap-03857d0bd1aa43efd",
|
||||
"volume_size": "8",
|
||||
"volume_type": "gp2"
|
||||
},
|
||||
"no_device": "",
|
||||
"virtual_name": ""
|
||||
}
|
||||
],
|
||||
"creation_date": "2020-07-21T18:33:16.000Z",
|
||||
"description": "Amazon Linux AMI 2018.03.0.20200716.0 x86_64 HVM gp2",
|
||||
"executable_users": null,
|
||||
"filter": [
|
||||
{
|
||||
"name": "name",
|
||||
"values": [
|
||||
"amzn-ami-hvm-*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hypervisor": "xen",
|
||||
"id": "ami-0aa9ac13698fff547",
|
||||
"image_id": "ami-0aa9ac13698fff547",
|
||||
"image_location": "amazon/amzn-ami-hvm-2018.03.0.20200716.0-x86_64-gp2",
|
||||
"image_owner_alias": "amazon",
|
||||
"image_type": "machine",
|
||||
"kernel_id": null,
|
||||
"most_recent": true,
|
||||
"name": "amzn-ami-hvm-2018.03.0.20200716.0-x86_64-gp2",
|
||||
"name_regex": null,
|
||||
"owner_id": "137112412989",
|
||||
"owners": [
|
||||
"amazon"
|
||||
],
|
||||
"platform": null,
|
||||
"product_codes": [],
|
||||
"public": true,
|
||||
"ramdisk_id": null,
|
||||
"root_device_name": "/dev/xvda",
|
||||
"root_device_type": "ebs",
|
||||
"root_snapshot_id": "snap-03857d0bd1aa43efd",
|
||||
"sriov_net_support": "simple",
|
||||
"state": "available",
|
||||
"state_reason": {
|
||||
"code": "UNSET",
|
||||
"message": "UNSET"
|
||||
},
|
||||
"tags": {},
|
||||
"virtualization_type": "hvm"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "aws_instance",
|
||||
"name": "vm",
|
||||
"provider": "provider.aws",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 1,
|
||||
"attributes": {
|
||||
"ami": "ami-0aa9ac13698fff547",
|
||||
"arn": "arn:aws:ec2:eu-west-3:929327065333:instance/i-07dbbae1c3fc4c194",
|
||||
"associate_public_ip_address": true,
|
||||
"availability_zone": "eu-west-3b",
|
||||
"cpu_core_count": 1,
|
||||
"cpu_threads_per_core": 2,
|
||||
"credit_specification": [
|
||||
{
|
||||
"cpu_credits": "unlimited"
|
||||
}
|
||||
],
|
||||
"disable_api_termination": false,
|
||||
"ebs_block_device": [],
|
||||
"ebs_optimized": false,
|
||||
"ephemeral_block_device": [],
|
||||
"get_password_data": false,
|
||||
"hibernation": false,
|
||||
"host_id": null,
|
||||
"iam_instance_profile": "",
|
||||
"id": "i-07dbbae1c3fc4c194",
|
||||
"instance_initiated_shutdown_behavior": null,
|
||||
"instance_state": "running",
|
||||
"instance_type": "t3.nano",
|
||||
"ipv6_address_count": 0,
|
||||
"ipv6_addresses": [],
|
||||
"key_name": "",
|
||||
"metadata_options": [
|
||||
{
|
||||
"http_endpoint": "enabled",
|
||||
"http_put_response_hop_limit": 1,
|
||||
"http_tokens": "optional"
|
||||
}
|
||||
],
|
||||
"monitoring": false,
|
||||
"network_interface": [],
|
||||
"network_interface_id": null,
|
||||
"outpost_arn": "",
|
||||
"password_data": "",
|
||||
"placement_group": "",
|
||||
"primary_network_interface_id": "eni-0e489fe405754f162",
|
||||
"private_dns": "ip-172-31-16-40.eu-west-3.compute.internal",
|
||||
"private_ip": "172.31.16.40",
|
||||
"public_dns": "ec2-15-236-123-61.eu-west-3.compute.amazonaws.com",
|
||||
"public_ip": "15.236.123.61",
|
||||
"root_block_device": [
|
||||
{
|
||||
"delete_on_termination": true,
|
||||
"device_name": "/dev/xvda",
|
||||
"encrypted": false,
|
||||
"iops": 100,
|
||||
"kms_key_id": "",
|
||||
"volume_id": "vol-0d30c5228ef04fe70",
|
||||
"volume_size": 8,
|
||||
"volume_type": "gp2"
|
||||
}
|
||||
],
|
||||
"security_groups": [
|
||||
"default"
|
||||
],
|
||||
"source_dest_check": true,
|
||||
"subnet_id": "subnet-49f9ae32",
|
||||
"tags": {
|
||||
"Name": "DEMO VM DESTROY ME - default",
|
||||
"Terraform": "true"
|
||||
},
|
||||
"tenancy": "default",
|
||||
"timeouts": null,
|
||||
"user_data": null,
|
||||
"user_data_base64": null,
|
||||
"volume_tags": {},
|
||||
"vpc_security_group_ids": [
|
||||
"sg-a74815c8"
|
||||
]
|
||||
},
|
||||
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ=="
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package state
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/go-version"
|
||||
)
|
||||
|
||||
var (
|
||||
// UnsupportedVersionConstraints is an array of version constraints known to be unsupported.
|
||||
// If a given state matches one of these, all resources of the related state will be ignored and marked as drifted.
|
||||
UnsupportedVersionConstraints = []string{"<0.11.0"}
|
||||
)
|
||||
|
||||
type UnsupportedVersionError struct {
|
||||
StateFile string
|
||||
Version *version.Version
|
||||
}
|
||||
|
||||
func (u *UnsupportedVersionError) Error() string {
|
||||
return fmt.Sprintf("%s was generated using Terraform %s which is currently not supported by driftctl. Please read documentation at https://docs.driftctl.com/limitations", u.StateFile, u.Version)
|
||||
}
|
||||
|
||||
func IsVersionSupported(rawVersion string) (bool, error) {
|
||||
v, err := version.NewVersion(rawVersion)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
for _, rawConstraint := range UnsupportedVersionConstraints {
|
||||
c, err := version.NewConstraint(rawConstraint)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if c.Check(v) {
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package state
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestUnsupportedVersions(t *testing.T) {
|
||||
var tests = []struct {
|
||||
name string
|
||||
constraints []string
|
||||
version string
|
||||
supported bool
|
||||
err error
|
||||
}{
|
||||
{
|
||||
name: "should not support 0.13",
|
||||
constraints: []string{"=0.13"},
|
||||
version: "0.13.0",
|
||||
supported: false,
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "should return error on version parsing",
|
||||
constraints: UnsupportedVersionConstraints,
|
||||
version: "test",
|
||||
supported: false,
|
||||
err: errors.New("Malformed version: test"),
|
||||
},
|
||||
{
|
||||
name: "should return error on constraint parsing",
|
||||
constraints: []string{"bad_constraint"},
|
||||
version: "0.14",
|
||||
supported: false,
|
||||
err: errors.New("Malformed constraint: bad_constraint"),
|
||||
},
|
||||
{
|
||||
name: "should support 0.11",
|
||||
constraints: UnsupportedVersionConstraints,
|
||||
version: "0.11.0",
|
||||
supported: true,
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "should support 0.14.8",
|
||||
constraints: UnsupportedVersionConstraints,
|
||||
version: "0.14.8",
|
||||
supported: true,
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "should not support <0.11",
|
||||
constraints: UnsupportedVersionConstraints,
|
||||
version: "0.10.9",
|
||||
supported: false,
|
||||
err: nil,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
UnsupportedVersionConstraints = test.constraints
|
||||
|
||||
got, err := IsVersionSupported(test.version)
|
||||
assert.Equal(t, test.supported, got)
|
||||
|
||||
if err != nil {
|
||||
assert.EqualError(t, test.err, err.Error())
|
||||
} else {
|
||||
assert.Equal(t, test.err, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
|
@ -36,39 +36,6 @@ func (m AwsDefaults) awsIamRoleDefaults(remoteResources []resource.Resource) []r
|
|||
return resourcesToIgnore
|
||||
}
|
||||
|
||||
func (m AwsDefaults) awsIamPolicyAttachmentDefaults(remoteResources []resource.Resource) []resource.Resource {
|
||||
resourcesToIgnore := make([]resource.Resource, 0)
|
||||
|
||||
for _, remoteResource := range remoteResources {
|
||||
// Ignore all resources other than iam policy attachment
|
||||
if remoteResource.TerraformType() != aws.AwsIamPolicyAttachmentResourceType {
|
||||
continue
|
||||
}
|
||||
|
||||
defaultRolesCount := 0
|
||||
for _, roleId := range *remoteResource.(*aws.AwsIamPolicyAttachment).Roles {
|
||||
var role *aws.AwsIamRole
|
||||
for _, res := range remoteResources {
|
||||
if res.TerraformType() == aws.AwsIamRoleResourceType && res.TerraformId() == roleId {
|
||||
role = res.(*aws.AwsIamRole)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if match := strings.HasPrefix(*role.Path, defaultIamRolePathPrefix); match {
|
||||
defaultRolesCount++
|
||||
}
|
||||
}
|
||||
|
||||
// Check if all of the policy's roles are default AWS roles
|
||||
if defaultRolesCount == len(*remoteResource.(*aws.AwsIamPolicyAttachment).Roles) {
|
||||
resourcesToIgnore = append(resourcesToIgnore, remoteResource)
|
||||
}
|
||||
}
|
||||
|
||||
return resourcesToIgnore
|
||||
}
|
||||
|
||||
func (m AwsDefaults) awsIamRolePolicyDefaults(remoteResources []resource.Resource) []resource.Resource {
|
||||
resourcesToIgnore := make([]resource.Resource, 0)
|
||||
|
||||
|
@ -100,7 +67,6 @@ func (m AwsDefaults) Execute(remoteResources, resourcesFromState *[]resource.Res
|
|||
resourcesToIgnore := make([]resource.Resource, 0)
|
||||
|
||||
resourcesToIgnore = append(resourcesToIgnore, m.awsIamRoleDefaults(*remoteResources)...)
|
||||
resourcesToIgnore = append(resourcesToIgnore, m.awsIamPolicyAttachmentDefaults(*remoteResources)...)
|
||||
resourcesToIgnore = append(resourcesToIgnore, m.awsIamRolePolicyDefaults(*remoteResources)...)
|
||||
|
||||
for _, res := range *remoteResources {
|
||||
|
|
|
@ -107,109 +107,6 @@ func TestAwsDefaults_Execute(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"test that default iam policy attachment are excluded when not managed by IaC",
|
||||
[]resource.Resource{
|
||||
&aws.AwsIamRole{
|
||||
Id: "custom-role",
|
||||
Path: func(p string) *string { return &p }("/not-aws-service-role/sso.amazonaws.com"),
|
||||
},
|
||||
&aws.AwsIamRole{
|
||||
Id: "AWSServiceRoleForSSO",
|
||||
Path: func(p string) *string { return &p }("/aws-service-role/sso.amazonaws.com"),
|
||||
},
|
||||
&aws.AwsIamPolicyAttachment{
|
||||
Id: "driftctl_test-arn:aws:iam::0123456789:policy/driftctl",
|
||||
Roles: &[]string{"custom-role"},
|
||||
},
|
||||
&aws.AwsIamPolicyAttachment{
|
||||
Id: "AWSServiceRoleForSSO-arn:aws:iam::aws:policy/aws-service-role/AWSSSOServiceRolePolicy",
|
||||
Roles: &[]string{"AWSServiceRoleForSSO"},
|
||||
},
|
||||
&aws.AwsIamPolicyAttachment{
|
||||
Id: "AWSServiceRoleForSSO-arn:aws:iam::aws:policy/aws-service-role/whatever",
|
||||
Roles: &[]string{"AWSServiceRoleForSSO"},
|
||||
},
|
||||
},
|
||||
[]resource.Resource{},
|
||||
diff.Changelog{
|
||||
{
|
||||
Type: diff.DELETE,
|
||||
Path: []string{"0"},
|
||||
From: &aws.AwsIamRole{
|
||||
Id: "custom-role",
|
||||
Path: func(p string) *string { return &p }("/not-aws-service-role/sso.amazonaws.com"),
|
||||
},
|
||||
To: nil,
|
||||
},
|
||||
{
|
||||
Type: diff.DELETE,
|
||||
Path: []string{"1"},
|
||||
From: &aws.AwsIamPolicyAttachment{
|
||||
Id: "driftctl_test-arn:aws:iam::0123456789:policy/driftctl",
|
||||
Roles: &[]string{"custom-role"},
|
||||
},
|
||||
To: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"test that default iam policy attachment are excluded when managed by IaC",
|
||||
[]resource.Resource{
|
||||
&aws.AwsIamRole{
|
||||
Id: "custom-role",
|
||||
Path: func(p string) *string { return &p }("/not-aws-service-role/sso.amazonaws.com"),
|
||||
},
|
||||
&aws.AwsIamRole{
|
||||
Id: "AWSServiceRoleForSSO",
|
||||
Path: func(p string) *string { return &p }("/aws-service-role/sso.amazonaws.com"),
|
||||
},
|
||||
&aws.AwsIamPolicyAttachment{
|
||||
Id: "driftctl_test-arn:aws:iam::0123456789:policy/driftctl",
|
||||
Roles: &[]string{"custom-role"},
|
||||
},
|
||||
&aws.AwsIamPolicyAttachment{
|
||||
Id: "AWSServiceRoleForSSO-arn:aws:iam::aws:policy/aws-service-role/AWSSSOServiceRolePolicy",
|
||||
Roles: &[]string{"AWSServiceRoleForSSO"},
|
||||
},
|
||||
&aws.AwsIamPolicyAttachment{
|
||||
Id: "AWSServiceRoleForSSO-arn:aws:iam::aws:policy/aws-service-role/whatever",
|
||||
Roles: &[]string{"custom-role", "AWSServiceRoleForSSO"},
|
||||
Users: nil,
|
||||
},
|
||||
},
|
||||
[]resource.Resource{
|
||||
&aws.AwsIamPolicyAttachment{
|
||||
Id: "AWSServiceRoleForSSO-arn:aws:iam::aws:policy/aws-service-role/AWSSSOServiceRolePolicy",
|
||||
Roles: &[]string{"AWSServiceRoleForSSO"},
|
||||
Users: &[]string{"test"},
|
||||
},
|
||||
&aws.AwsIamRole{
|
||||
Id: "custom-role",
|
||||
Path: func(p string) *string { return &p }("/not-aws-service-role/sso.amazonaws.com"),
|
||||
},
|
||||
},
|
||||
diff.Changelog{
|
||||
{
|
||||
Type: diff.DELETE,
|
||||
Path: []string{"1"},
|
||||
From: &aws.AwsIamPolicyAttachment{
|
||||
Id: "driftctl_test-arn:aws:iam::0123456789:policy/driftctl",
|
||||
Roles: &[]string{"custom-role"},
|
||||
},
|
||||
To: nil,
|
||||
},
|
||||
{
|
||||
Type: diff.DELETE,
|
||||
Path: []string{"2"},
|
||||
From: &aws.AwsIamPolicyAttachment{
|
||||
Id: "AWSServiceRoleForSSO-arn:aws:iam::aws:policy/aws-service-role/whatever",
|
||||
Roles: &[]string{"AWSServiceRoleForSSO", "custom-role"},
|
||||
},
|
||||
To: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"ignore default iam role policies when they're not managed by IaC",
|
||||
[]resource.Resource{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package output
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"go.uber.org/atomic"
|
||||
|
@ -22,17 +23,31 @@ type Progress interface {
|
|||
Val() uint64
|
||||
}
|
||||
|
||||
type progress struct {
|
||||
endChan chan struct{}
|
||||
started *atomic.Bool
|
||||
count *atomic.Uint64
|
||||
type ProgressOptions struct {
|
||||
LoadingText string
|
||||
FinishedText string
|
||||
ShowCount bool
|
||||
}
|
||||
|
||||
func NewProgress() *progress {
|
||||
type progress struct {
|
||||
endChan chan struct{}
|
||||
started *atomic.Bool
|
||||
count *atomic.Uint64
|
||||
loadingText string
|
||||
finishedText string
|
||||
showCount bool
|
||||
highestLineLength int
|
||||
}
|
||||
|
||||
func NewProgress(loadingText, finishedText string, showCount bool) *progress {
|
||||
return &progress{
|
||||
nil,
|
||||
atomic.NewBool(false),
|
||||
atomic.NewUint64(0),
|
||||
loadingText,
|
||||
finishedText,
|
||||
showCount,
|
||||
0,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,7 +62,11 @@ func (p *progress) Start() {
|
|||
|
||||
func (p *progress) Stop() {
|
||||
if p.started.Swap(false) {
|
||||
Printf("Scanned resources: (%d)\n", p.count.Load())
|
||||
if p.showCount {
|
||||
p.printf("%s (%d)\n", p.finishedText, p.count.Load())
|
||||
} else {
|
||||
p.printf("%s\r", p.finishedText)
|
||||
}
|
||||
close(p.endChan)
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +86,7 @@ func (p *progress) Val() uint64 {
|
|||
|
||||
func (p *progress) render() {
|
||||
i := -1
|
||||
Printf("Scanning resources:\r")
|
||||
p.printf("%s\r", p.loadingText)
|
||||
for {
|
||||
select {
|
||||
case <-p.endChan:
|
||||
|
@ -77,7 +96,11 @@ func (p *progress) render() {
|
|||
if i >= len(spinner) {
|
||||
i = 0
|
||||
}
|
||||
Printf("Scanning resources: %s (%d)\r", spinner[i], p.count.Load())
|
||||
if p.showCount {
|
||||
p.printf("%s %s (%d)\r", p.loadingText, spinner[i], p.count.Load())
|
||||
} else {
|
||||
p.printf("%s %s\r", p.loadingText, spinner[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,3 +124,20 @@ Loop:
|
|||
}
|
||||
logrus.Debug("Progress did not receive any tic. Stopping...")
|
||||
}
|
||||
|
||||
func (p *progress) flush() {
|
||||
for i := 0; i < p.highestLineLength; i++ {
|
||||
Printf(" ")
|
||||
}
|
||||
Printf("\r")
|
||||
}
|
||||
|
||||
func (p *progress) printf(format string, args ...interface{}) {
|
||||
txt := fmt.Sprintf(format, args...)
|
||||
length := len(txt)
|
||||
if length > p.highestLineLength {
|
||||
p.highestLineLength = length
|
||||
}
|
||||
p.flush()
|
||||
Printf(txt)
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
)
|
||||
|
||||
func TestProgressTimeoutDoesNotInc(t *testing.T) {
|
||||
progress := NewProgress()
|
||||
progress := NewProgress("loading", "loaded", false)
|
||||
progress.Start()
|
||||
progress.Inc()
|
||||
progress.Stop() // should not hang
|
||||
|
@ -21,7 +21,7 @@ func TestProgressTimeoutDoesNotInc(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestProgressTimeoutDoesNotHang(t *testing.T) {
|
||||
progress := NewProgress()
|
||||
progress := NewProgress("loading", "loaded", false)
|
||||
progress.Start()
|
||||
time.Sleep(progressTimeout)
|
||||
for progress.started.Load() == true {
|
||||
|
@ -32,7 +32,7 @@ func TestProgressTimeoutDoesNotHang(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestProgress(t *testing.T) {
|
||||
progress := NewProgress()
|
||||
progress := NewProgress("loading", "loaded", false)
|
||||
progress.Start()
|
||||
progress.Inc()
|
||||
progress.Inc()
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -24,8 +25,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -36,13 +35,13 @@ func TestIamAccessKeySupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeIAM)
|
||||
mocks func(client *awstest.MockFakeIAM)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no iam access_key",
|
||||
dirName: "iam_access_key_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -60,7 +59,7 @@ func TestIamAccessKeySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "iam multiples keys for multiples users",
|
||||
dirName: "iam_access_key_multiple",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -118,7 +117,7 @@ func TestIamAccessKeySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "Cannot list iam user",
|
||||
dirName: "iam_access_key_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -131,7 +130,7 @@ func TestIamAccessKeySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "Cannot list iam access_key",
|
||||
dirName: "iam_access_key_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -162,7 +161,7 @@ func TestIamAccessKeySupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeIam := mocks.FakeIAM{}
|
||||
fakeIam := awstest.MockFakeIAM{}
|
||||
c.mocks(&fakeIam)
|
||||
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -22,7 +23,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -34,13 +34,13 @@ func TestIamPolicySupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeIAM)
|
||||
mocks func(client *awstest.MockFakeIAM)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no iam custom policies",
|
||||
dirName: "iam_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On(
|
||||
"ListPoliciesPages",
|
||||
&iam.ListPoliciesInput{Scope: aws.String("Local")},
|
||||
|
@ -52,7 +52,7 @@ func TestIamPolicySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "iam multiples custom policies",
|
||||
dirName: "iam_policy_multiple",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListPoliciesPages",
|
||||
&iam.ListPoliciesInput{Scope: aws.String(iam.PolicyScopeTypeLocal)},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListPoliciesOutput, lastPage bool) bool) bool {
|
||||
|
@ -77,7 +77,7 @@ func TestIamPolicySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list iam custom policies",
|
||||
dirName: "iam_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On(
|
||||
"ListPoliciesPages",
|
||||
&iam.ListPoliciesInput{Scope: aws.String("Local")},
|
||||
|
@ -102,7 +102,7 @@ func TestIamPolicySupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeIam := mocks.FakeIAM{}
|
||||
fakeIam := awstest.MockFakeIAM{}
|
||||
c.mocks(&fakeIam)
|
||||
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -23,8 +24,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -35,13 +34,13 @@ func TestIamRolePolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeIAM)
|
||||
mocks func(client *awstest.MockFakeIAM)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "iam multiples roles multiple policies",
|
||||
dirName: "iam_role_policy_attachment_multiple",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -120,7 +119,7 @@ func TestIamRolePolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "check that we ignore policy for ignored roles",
|
||||
dirName: "iam_role_policy_attachment_for_ignored_roles",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -143,7 +142,7 @@ func TestIamRolePolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "Cannot list roles",
|
||||
dirName: "iam_role_policy_attachment_for_ignored_roles",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -156,7 +155,7 @@ func TestIamRolePolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "Cannot list roles policies",
|
||||
dirName: "iam_role_policy_attachment_for_ignored_roles",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -194,7 +193,7 @@ func TestIamRolePolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeIam := mocks.FakeIAM{}
|
||||
fakeIam := awstest.MockFakeIAM{}
|
||||
c.mocks(&fakeIam)
|
||||
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -23,8 +24,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -35,13 +34,13 @@ func TestIamRolePolicySupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeIAM)
|
||||
mocks func(client *awstest.MockFakeIAM)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "multiples roles without any inline policies",
|
||||
dirName: "iam_role_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -73,7 +72,7 @@ func TestIamRolePolicySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "iam multiples roles with inline policies",
|
||||
dirName: "iam_role_policy_multiple",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -134,7 +133,7 @@ func TestIamRolePolicySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "Cannot list roles",
|
||||
dirName: "iam_role_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -159,7 +158,7 @@ func TestIamRolePolicySupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeIam := mocks.FakeIAM{}
|
||||
fakeIam := awstest.MockFakeIAM{}
|
||||
c.mocks(&fakeIam)
|
||||
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -22,7 +23,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -34,13 +34,13 @@ func TestIamRoleSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeIAM)
|
||||
mocks func(client *awstest.MockFakeIAM)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no iam roles",
|
||||
dirName: "iam_role_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages", mock.Anything, mock.Anything).Return(nil)
|
||||
},
|
||||
err: nil,
|
||||
|
@ -48,7 +48,7 @@ func TestIamRoleSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "iam multiples roles",
|
||||
dirName: "iam_role_multiple",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -73,7 +73,7 @@ func TestIamRoleSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "iam roles ignore services roles",
|
||||
dirName: "iam_role_ignore_services_roles",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages",
|
||||
&iam.ListRolesInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListRolesOutput, lastPage bool) bool) bool {
|
||||
|
@ -96,7 +96,7 @@ func TestIamRoleSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list iam roles",
|
||||
dirName: "iam_role_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListRolesPages", mock.Anything, mock.Anything).Return(awserr.NewRequestFailure(nil, 403, ""))
|
||||
},
|
||||
err: remoteerror.NewResourceEnumerationError(awserr.NewRequestFailure(nil, 403, ""), resourceaws.AwsIamRoleResourceType),
|
||||
|
@ -117,7 +117,7 @@ func TestIamRoleSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeIam := mocks.FakeIAM{}
|
||||
fakeIam := awstest.MockFakeIAM{}
|
||||
c.mocks(&fakeIam)
|
||||
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -23,8 +24,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -35,13 +34,13 @@ func TestIamUserPolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeIAM)
|
||||
mocks func(client *awstest.MockFakeIAM)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "iam multiples users multiple policies",
|
||||
dirName: "iam_user_policy_attachment_multiple",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -159,7 +158,7 @@ func TestIamUserPolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list user",
|
||||
dirName: "iam_user_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -171,7 +170,7 @@ func TestIamUserPolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list user policies attachment",
|
||||
dirName: "iam_user_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -212,7 +211,7 @@ func TestIamUserPolicyAttachmentSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeIam := mocks.FakeIAM{}
|
||||
fakeIam := awstest.MockFakeIAM{}
|
||||
c.mocks(&fakeIam)
|
||||
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -23,8 +24,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -35,13 +34,13 @@ func TestIamUserPolicySupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeIAM)
|
||||
mocks func(client *awstest.MockFakeIAM)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no iam user (no policy)",
|
||||
dirName: "iam_user_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages", mock.Anything, mock.Anything).Return(nil)
|
||||
client.On("ListUserPoliciesPages", mock.Anything, mock.Anything).Panic("ListUsersPoliciesPages should not be called when there is no user")
|
||||
},
|
||||
|
@ -50,7 +49,7 @@ func TestIamUserPolicySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "iam multiples users multiple policies",
|
||||
dirName: "iam_user_policy_multiple",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -140,7 +139,7 @@ func TestIamUserPolicySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list iam user (no policy)",
|
||||
dirName: "iam_user_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages", mock.Anything, mock.Anything).Return(awserr.NewRequestFailure(nil, 403, ""))
|
||||
},
|
||||
err: remoteerror.NewResourceEnumerationErrorWithType(awserr.NewRequestFailure(nil, 403, ""), resourceaws.AwsIamUserPolicyResourceType, resourceaws.AwsIamUserResourceType),
|
||||
|
@ -149,7 +148,7 @@ func TestIamUserPolicySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list user policy",
|
||||
dirName: "iam_user_policy_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -183,7 +182,7 @@ func TestIamUserPolicySupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeIam := mocks.FakeIAM{}
|
||||
fakeIam := awstest.MockFakeIAM{}
|
||||
c.mocks(&fakeIam)
|
||||
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -24,8 +25,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -36,13 +35,13 @@ func TestIamUserSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeIAM)
|
||||
mocks func(client *awstest.MockFakeIAM)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no iam user",
|
||||
dirName: "iam_user_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages", mock.Anything, mock.Anything).Return(nil)
|
||||
},
|
||||
err: nil,
|
||||
|
@ -50,7 +49,7 @@ func TestIamUserSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "iam multiples users",
|
||||
dirName: "iam_user_multiple",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages",
|
||||
&iam.ListUsersInput{},
|
||||
mock.MatchedBy(func(callback func(res *iam.ListUsersOutput, lastPage bool) bool) bool {
|
||||
|
@ -75,7 +74,7 @@ func TestIamUserSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list iam user",
|
||||
dirName: "iam_user_empty",
|
||||
mocks: func(client *mocks.FakeIAM) {
|
||||
mocks: func(client *awstest.MockFakeIAM) {
|
||||
client.On("ListUsersPages", mock.Anything, mock.Anything).Return(awserr.NewRequestFailure(nil, 403, ""))
|
||||
},
|
||||
err: remoteerror.NewResourceEnumerationError(awserr.NewRequestFailure(nil, 403, ""), resourceaws.AwsIamUserResourceType),
|
||||
|
@ -96,7 +95,7 @@ func TestIamUserSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeIam := mocks.FakeIAM{}
|
||||
fakeIam := awstest.MockFakeIAM{}
|
||||
c.mocks(&fakeIam)
|
||||
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -13,7 +14,6 @@ import (
|
|||
awssdk "github.com/aws/aws-sdk-go/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/parallel"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/deserializer"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
|
@ -30,13 +30,13 @@ func TestInternetGatewaySupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no internet gateways",
|
||||
dirName: "internet_gateway_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeInternetGatewaysPages",
|
||||
&ec2.DescribeInternetGatewaysInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeInternetGatewaysOutput, lastPage bool) bool) bool {
|
||||
|
@ -49,7 +49,7 @@ func TestInternetGatewaySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "multiple internet gateways",
|
||||
dirName: "internet_gateway_multiple",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeInternetGatewaysPages",
|
||||
&ec2.DescribeInternetGatewaysInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeInternetGatewaysOutput, lastPage bool) bool) bool {
|
||||
|
@ -71,7 +71,7 @@ func TestInternetGatewaySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list internet gateways",
|
||||
dirName: "internet_gateway_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeInternetGatewaysPages",
|
||||
&ec2.DescribeInternetGatewaysInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeInternetGatewaysOutput, lastPage bool) bool) bool {
|
||||
|
@ -96,7 +96,7 @@ func TestInternetGatewaySupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
c.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
internetGatewayDeserializer := awsdeserializer.NewInternetGatewayDeserializer()
|
||||
|
|
|
@ -5,12 +5,12 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/parallel"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/deserializer"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
|
@ -28,13 +28,13 @@ func TestNatGatewaySupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no gateway",
|
||||
dirName: "nat_gateway_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeNatGatewaysPages",
|
||||
&ec2.DescribeNatGatewaysInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeNatGatewaysOutput, lastPage bool) bool) bool {
|
||||
|
@ -47,7 +47,7 @@ func TestNatGatewaySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "single aws_nat_gateway",
|
||||
dirName: "nat_gateway",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeNatGatewaysPages",
|
||||
&ec2.DescribeNatGatewaysInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeNatGatewaysOutput, lastPage bool) bool) bool {
|
||||
|
@ -66,7 +66,7 @@ func TestNatGatewaySupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list gateway",
|
||||
dirName: "nat_gateway_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeNatGatewaysPages",
|
||||
&ec2.DescribeNatGatewaysInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeNatGatewaysOutput, lastPage bool) bool) bool {
|
||||
|
@ -91,7 +91,7 @@ func TestNatGatewaySupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
c.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
natGatewaydeserializer := awsdeserializer.NewNatGatewayDeserializer()
|
||||
|
|
|
@ -5,12 +5,12 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/cloudfront"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/r3labs/diff/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -18,13 +18,13 @@ import (
|
|||
func Test_cloudfrontRepository_ListAllDistributions(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.CloudfrontClient)
|
||||
mocks func(client *awstest.MockFakeCloudFront)
|
||||
want []*cloudfront.DistributionSummary
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "list multiple distributions",
|
||||
mocks: func(client *mocks.CloudfrontClient) {
|
||||
mocks: func(client *awstest.MockFakeCloudFront) {
|
||||
client.On("ListDistributionsPages",
|
||||
&cloudfront.ListDistributionsInput{},
|
||||
mock.MatchedBy(func(callback func(res *cloudfront.ListDistributionsOutput, lastPage bool) bool) bool {
|
||||
|
@ -61,10 +61,10 @@ func Test_cloudfrontRepository_ListAllDistributions(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.CloudfrontClient{}
|
||||
tt.mocks(client)
|
||||
client := awstest.MockFakeCloudFront{}
|
||||
tt.mocks(&client)
|
||||
r := &cloudfrontRepository{
|
||||
client: client,
|
||||
client: &client,
|
||||
}
|
||||
got, err := r.ListAllDistributions()
|
||||
assert.Equal(t, tt.wantErr, err)
|
||||
|
|
|
@ -5,12 +5,12 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/dynamodb"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/r3labs/diff/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -19,13 +19,13 @@ func Test_dynamoDBRepository_ListAllTopics(t *testing.T) {
|
|||
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.DynamodbClient)
|
||||
mocks func(client *awstest.MockFakeDynamoDB)
|
||||
want []*string
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "List with 2 pages",
|
||||
mocks: func(client *mocks.DynamodbClient) {
|
||||
mocks: func(client *awstest.MockFakeDynamoDB) {
|
||||
client.On("ListTablesPages",
|
||||
&dynamodb.ListTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *dynamodb.ListTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -58,10 +58,10 @@ func Test_dynamoDBRepository_ListAllTopics(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.DynamodbClient{}
|
||||
tt.mocks(client)
|
||||
client := awstest.MockFakeDynamoDB{}
|
||||
tt.mocks(&client)
|
||||
r := &dynamoDBRepository{
|
||||
client: client,
|
||||
client: &client,
|
||||
}
|
||||
got, err := r.ListAllTables()
|
||||
assert.Equal(t, tt.wantErr, err)
|
||||
|
|
|
@ -5,12 +5,12 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/ecr"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/r3labs/diff/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -19,13 +19,13 @@ func Test_ecrRepository_ListAllRepositories(t *testing.T) {
|
|||
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.ECRClient)
|
||||
mocks func(client *awstest.MockFakeECR)
|
||||
want []*ecr.Repository
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "List with 2 pages",
|
||||
mocks: func(client *mocks.ECRClient) {
|
||||
mocks: func(client *awstest.MockFakeECR) {
|
||||
client.On("DescribeRepositoriesPages",
|
||||
&ecr.DescribeRepositoriesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ecr.DescribeRepositoriesOutput, lastPage bool) bool) bool {
|
||||
|
@ -58,10 +58,10 @@ func Test_ecrRepository_ListAllRepositories(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.ECRClient{}
|
||||
tt.mocks(client)
|
||||
client := awstest.MockFakeECR{}
|
||||
tt.mocks(&client)
|
||||
r := &ecrRepository{
|
||||
client: client,
|
||||
client: &client,
|
||||
}
|
||||
got, err := r.ListAllRepositories()
|
||||
assert.Equal(t, tt.wantErr, err)
|
||||
|
|
|
@ -5,12 +5,12 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/kms"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/r3labs/diff/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -18,13 +18,13 @@ import (
|
|||
func Test_KMSRepository_ListAllKeys(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.KMSClient)
|
||||
mocks func(client *awstest.MockFakeKMS)
|
||||
want []*kms.KeyListEntry
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "List only customer keys",
|
||||
mocks: func(client *mocks.KMSClient) {
|
||||
mocks: func(client *awstest.MockFakeKMS) {
|
||||
client.On("ListKeysPages",
|
||||
&kms.ListKeysInput{},
|
||||
mock.MatchedBy(func(callback func(res *kms.ListKeysOutput, lastPage bool) bool) bool {
|
||||
|
@ -72,10 +72,10 @@ func Test_KMSRepository_ListAllKeys(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.KMSClient{}
|
||||
tt.mocks(client)
|
||||
client := awstest.MockFakeKMS{}
|
||||
tt.mocks(&client)
|
||||
r := &kmsRepository{
|
||||
client: client,
|
||||
client: &client,
|
||||
}
|
||||
got, err := r.ListAllKeys()
|
||||
assert.Equal(t, tt.wantErr, err)
|
||||
|
@ -94,13 +94,13 @@ func Test_KMSRepository_ListAllKeys(t *testing.T) {
|
|||
func Test_KMSRepository_ListAllAliases(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.KMSClient)
|
||||
mocks func(client *awstest.MockFakeKMS)
|
||||
want []*kms.AliasListEntry
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "List only customer aliases",
|
||||
mocks: func(client *mocks.KMSClient) {
|
||||
mocks: func(client *awstest.MockFakeKMS) {
|
||||
client.On("ListAliasesPages",
|
||||
&kms.ListAliasesInput{},
|
||||
mock.MatchedBy(func(callback func(res *kms.ListAliasesOutput, lastPage bool) bool) bool {
|
||||
|
@ -129,10 +129,10 @@ func Test_KMSRepository_ListAllAliases(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.KMSClient{}
|
||||
tt.mocks(client)
|
||||
client := awstest.MockFakeKMS{}
|
||||
tt.mocks(&client)
|
||||
r := &kmsRepository{
|
||||
client: client,
|
||||
client: &client,
|
||||
}
|
||||
got, err := r.ListAllAliases()
|
||||
assert.Equal(t, tt.wantErr, err)
|
||||
|
|
|
@ -5,12 +5,12 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/r3labs/diff/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -19,13 +19,13 @@ func Test_route53Repository_ListAllHealthChecks(t *testing.T) {
|
|||
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.Route53Client)
|
||||
mocks func(client *awstest.MockFakeRoute53)
|
||||
want []*route53.HealthCheck
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "List with 2 pages",
|
||||
mocks: func(client *mocks.Route53Client) {
|
||||
mocks: func(client *awstest.MockFakeRoute53) {
|
||||
client.On("ListHealthChecksPages",
|
||||
&route53.ListHealthChecksInput{},
|
||||
mock.MatchedBy(func(callback func(res *route53.ListHealthChecksOutput, lastPage bool) bool) bool {
|
||||
|
@ -58,10 +58,10 @@ func Test_route53Repository_ListAllHealthChecks(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.Route53Client{}
|
||||
tt.mocks(client)
|
||||
client := awstest.MockFakeRoute53{}
|
||||
tt.mocks(&client)
|
||||
r := &route53Repository{
|
||||
client: client,
|
||||
client: &client,
|
||||
}
|
||||
got, err := r.ListAllHealthChecks()
|
||||
assert.Equal(t, tt.wantErr, err)
|
||||
|
@ -80,12 +80,12 @@ func Test_route53Repository_ListAllHealthChecks(t *testing.T) {
|
|||
func Test_route53Repository_ListAllZones(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.Route53Client)
|
||||
mocks func(client *awstest.MockFakeRoute53)
|
||||
want []*route53.HostedZone
|
||||
wantErr error
|
||||
}{
|
||||
{name: "Zones with 2 pages",
|
||||
mocks: func(client *mocks.Route53Client) {
|
||||
mocks: func(client *awstest.MockFakeRoute53) {
|
||||
client.On("ListHostedZonesPages",
|
||||
&route53.ListHostedZonesInput{},
|
||||
mock.MatchedBy(func(callback func(res *route53.ListHostedZonesOutput, lastPage bool) bool) bool {
|
||||
|
@ -118,10 +118,10 @@ func Test_route53Repository_ListAllZones(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.Route53Client{}
|
||||
tt.mocks(client)
|
||||
client := awstest.MockFakeRoute53{}
|
||||
tt.mocks(&client)
|
||||
r := &route53Repository{
|
||||
client: client,
|
||||
client: &client,
|
||||
}
|
||||
got, err := r.ListAllZones()
|
||||
assert.Equal(t, tt.wantErr, err)
|
||||
|
@ -141,7 +141,7 @@ func Test_route53Repository_ListRecordsForZone(t *testing.T) {
|
|||
tests := []struct {
|
||||
name string
|
||||
zoneIds []string
|
||||
mocks func(client *mocks.Route53Client)
|
||||
mocks func(client *awstest.MockFakeRoute53)
|
||||
want []*route53.ResourceRecordSet
|
||||
wantErr error
|
||||
}{
|
||||
|
@ -150,7 +150,7 @@ func Test_route53Repository_ListRecordsForZone(t *testing.T) {
|
|||
zoneIds: []string{
|
||||
"1",
|
||||
},
|
||||
mocks: func(client *mocks.Route53Client) {
|
||||
mocks: func(client *awstest.MockFakeRoute53) {
|
||||
client.On("ListResourceRecordSetsPages",
|
||||
&route53.ListResourceRecordSetsInput{
|
||||
HostedZoneId: aws.String("1"),
|
||||
|
@ -185,10 +185,10 @@ func Test_route53Repository_ListRecordsForZone(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.Route53Client{}
|
||||
tt.mocks(client)
|
||||
client := awstest.MockFakeRoute53{}
|
||||
tt.mocks(&client)
|
||||
r := &route53Repository{
|
||||
client: client,
|
||||
client: &client,
|
||||
}
|
||||
for _, id := range tt.zoneIds {
|
||||
got, err := r.ListRecordsForZone(id)
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
awssdk "github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/aws/client"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/r3labs/diff/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -19,13 +19,13 @@ func Test_s3Repository_ListAllBuckets(t *testing.T) {
|
|||
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.FakeS3)
|
||||
mocks func(client *awstest.MockFakeS3)
|
||||
want []*s3.Bucket
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "List buckets",
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("ListBuckets", &s3.ListBucketsInput{}).Return(
|
||||
&s3.ListBucketsOutput{
|
||||
Buckets: []*s3.Bucket{
|
||||
|
@ -45,7 +45,7 @@ func Test_s3Repository_ListAllBuckets(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "Error listing buckets",
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("ListBuckets", &s3.ListBucketsInput{}).Return(
|
||||
nil,
|
||||
awserr.NewRequestFailure(nil, 403, ""),
|
||||
|
@ -57,7 +57,7 @@ func Test_s3Repository_ListAllBuckets(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
mockedClient := &mocks.FakeS3{}
|
||||
mockedClient := &awstest.MockFakeS3{}
|
||||
tt.mocks(mockedClient)
|
||||
factory := client.MockAwsClientFactoryInterface{}
|
||||
factory.On("GetS3Client", (*aws.Config)(nil)).Return(mockedClient).Once()
|
||||
|
@ -84,7 +84,7 @@ func Test_s3Repository_ListBucketInventoryConfigurations(t *testing.T) {
|
|||
bucket s3.Bucket
|
||||
region string
|
||||
}
|
||||
mocks func(client *mocks.FakeS3)
|
||||
mocks func(client *awstest.MockFakeS3)
|
||||
want []*s3.InventoryConfiguration
|
||||
wantErr string
|
||||
}{
|
||||
|
@ -99,7 +99,7 @@ func Test_s3Repository_ListBucketInventoryConfigurations(t *testing.T) {
|
|||
},
|
||||
region: "us-east-1",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On(
|
||||
"ListBucketInventoryConfigurations",
|
||||
&s3.ListBucketInventoryConfigurationsInput{
|
||||
|
@ -156,7 +156,7 @@ func Test_s3Repository_ListBucketInventoryConfigurations(t *testing.T) {
|
|||
},
|
||||
region: "us-east-1",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On(
|
||||
"ListBucketInventoryConfigurations",
|
||||
&s3.ListBucketInventoryConfigurationsInput{
|
||||
|
@ -173,7 +173,7 @@ func Test_s3Repository_ListBucketInventoryConfigurations(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
mockedClient := &mocks.FakeS3{}
|
||||
mockedClient := &awstest.MockFakeS3{}
|
||||
tt.mocks(mockedClient)
|
||||
factory := client.MockAwsClientFactoryInterface{}
|
||||
factory.On("GetS3Client", &aws.Config{Region: awssdk.String(tt.input.region)}).Return(mockedClient).Once()
|
||||
|
@ -205,7 +205,7 @@ func Test_s3Repository_ListBucketMetricsConfigurations(t *testing.T) {
|
|||
bucket s3.Bucket
|
||||
region string
|
||||
}
|
||||
mocks func(client *mocks.FakeS3)
|
||||
mocks func(client *awstest.MockFakeS3)
|
||||
want []*s3.MetricsConfiguration
|
||||
wantErr string
|
||||
}{
|
||||
|
@ -220,7 +220,7 @@ func Test_s3Repository_ListBucketMetricsConfigurations(t *testing.T) {
|
|||
},
|
||||
region: "us-east-1",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On(
|
||||
"ListBucketMetricsConfigurations",
|
||||
&s3.ListBucketMetricsConfigurationsInput{
|
||||
|
@ -277,7 +277,7 @@ func Test_s3Repository_ListBucketMetricsConfigurations(t *testing.T) {
|
|||
},
|
||||
region: "us-east-1",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On(
|
||||
"ListBucketMetricsConfigurations",
|
||||
&s3.ListBucketMetricsConfigurationsInput{
|
||||
|
@ -294,7 +294,7 @@ func Test_s3Repository_ListBucketMetricsConfigurations(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
mockedClient := &mocks.FakeS3{}
|
||||
mockedClient := &awstest.MockFakeS3{}
|
||||
tt.mocks(mockedClient)
|
||||
factory := client.MockAwsClientFactoryInterface{}
|
||||
factory.On("GetS3Client", &aws.Config{Region: awssdk.String(tt.input.region)}).Return(mockedClient).Once()
|
||||
|
@ -326,7 +326,7 @@ func Test_s3Repository_ListBucketAnalyticsConfigurations(t *testing.T) {
|
|||
bucket s3.Bucket
|
||||
region string
|
||||
}
|
||||
mocks func(client *mocks.FakeS3)
|
||||
mocks func(client *awstest.MockFakeS3)
|
||||
want []*s3.AnalyticsConfiguration
|
||||
wantErr string
|
||||
}{
|
||||
|
@ -341,7 +341,7 @@ func Test_s3Repository_ListBucketAnalyticsConfigurations(t *testing.T) {
|
|||
},
|
||||
region: "us-east-1",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On(
|
||||
"ListBucketAnalyticsConfigurations",
|
||||
&s3.ListBucketAnalyticsConfigurationsInput{
|
||||
|
@ -398,7 +398,7 @@ func Test_s3Repository_ListBucketAnalyticsConfigurations(t *testing.T) {
|
|||
},
|
||||
region: "us-east-1",
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On(
|
||||
"ListBucketAnalyticsConfigurations",
|
||||
&s3.ListBucketAnalyticsConfigurationsInput{
|
||||
|
@ -415,7 +415,7 @@ func Test_s3Repository_ListBucketAnalyticsConfigurations(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
mockedClient := &mocks.FakeS3{}
|
||||
mockedClient := &awstest.MockFakeS3{}
|
||||
tt.mocks(mockedClient)
|
||||
factory := client.MockAwsClientFactoryInterface{}
|
||||
factory.On("GetS3Client", &aws.Config{Region: awssdk.String(tt.input.region)}).Return(mockedClient).Once()
|
||||
|
@ -445,7 +445,7 @@ func Test_s3Repository_GetBucketLocation(t *testing.T) {
|
|||
tests := []struct {
|
||||
name string
|
||||
bucket *s3.Bucket
|
||||
mocks func(client *mocks.FakeS3)
|
||||
mocks func(client *awstest.MockFakeS3)
|
||||
want string
|
||||
wantErr string
|
||||
}{
|
||||
|
@ -454,7 +454,7 @@ func Test_s3Repository_GetBucketLocation(t *testing.T) {
|
|||
bucket: &s3.Bucket{
|
||||
Name: awssdk.String("test-bucket"),
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("GetBucketLocation", &s3.GetBucketLocationInput{
|
||||
Bucket: awssdk.String("test-bucket"),
|
||||
}).Return(
|
||||
|
@ -471,7 +471,7 @@ func Test_s3Repository_GetBucketLocation(t *testing.T) {
|
|||
bucket: &s3.Bucket{
|
||||
Name: awssdk.String("test-bucket"),
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("GetBucketLocation", &s3.GetBucketLocationInput{
|
||||
Bucket: awssdk.String("test-bucket"),
|
||||
}).Return(
|
||||
|
@ -486,7 +486,7 @@ func Test_s3Repository_GetBucketLocation(t *testing.T) {
|
|||
bucket: &s3.Bucket{
|
||||
Name: awssdk.String("test-bucket"),
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("GetBucketLocation", &s3.GetBucketLocationInput{
|
||||
Bucket: awssdk.String("test-bucket"),
|
||||
}).Return(
|
||||
|
@ -501,7 +501,7 @@ func Test_s3Repository_GetBucketLocation(t *testing.T) {
|
|||
bucket: &s3.Bucket{
|
||||
Name: awssdk.String("test-bucket"),
|
||||
},
|
||||
mocks: func(client *mocks.FakeS3) {
|
||||
mocks: func(client *awstest.MockFakeS3) {
|
||||
client.On("GetBucketLocation", &s3.GetBucketLocationInput{
|
||||
Bucket: awssdk.String("test-bucket"),
|
||||
}).Return(
|
||||
|
@ -514,7 +514,7 @@ func Test_s3Repository_GetBucketLocation(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
mockedClient := &mocks.FakeS3{}
|
||||
mockedClient := &awstest.MockFakeS3{}
|
||||
tt.mocks(mockedClient)
|
||||
factory := client.MockAwsClientFactoryInterface{}
|
||||
factory.On("GetS3Client", (*aws.Config)(nil)).Return(mockedClient).Once()
|
||||
|
|
|
@ -5,10 +5,10 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/r3labs/diff/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
|
@ -19,13 +19,13 @@ func Test_snsRepository_ListAllTopics(t *testing.T) {
|
|||
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.SNSClient)
|
||||
mocks func(client *awstest.MockFakeSNS)
|
||||
want []*sns.Topic
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "List with 2 pages",
|
||||
mocks: func(client *mocks.SNSClient) {
|
||||
mocks: func(client *awstest.MockFakeSNS) {
|
||||
client.On("ListTopicsPages",
|
||||
&sns.ListTopicsInput{},
|
||||
mock.MatchedBy(func(callback func(res *sns.ListTopicsOutput, lastPage bool) bool) bool {
|
||||
|
@ -58,7 +58,7 @@ func Test_snsRepository_ListAllTopics(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.SNSClient{}
|
||||
client := &awstest.MockFakeSNS{}
|
||||
tt.mocks(client)
|
||||
r := &snsRepository{
|
||||
client: client,
|
||||
|
@ -80,13 +80,13 @@ func Test_snsRepository_ListAllTopics(t *testing.T) {
|
|||
func Test_snsRepository_ListAllSubscriptions(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.SNSClient)
|
||||
mocks func(client *awstest.MockFakeSNS)
|
||||
want []*sns.Subscription
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "List with 2 pages",
|
||||
mocks: func(client *mocks.SNSClient) {
|
||||
mocks: func(client *awstest.MockFakeSNS) {
|
||||
client.On("ListSubscriptionsPages",
|
||||
&sns.ListSubscriptionsInput{},
|
||||
mock.MatchedBy(func(callback func(res *sns.ListSubscriptionsOutput, lastPage bool) bool) bool {
|
||||
|
@ -119,7 +119,7 @@ func Test_snsRepository_ListAllSubscriptions(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.SNSClient{}
|
||||
client := &awstest.MockFakeSNS{}
|
||||
tt.mocks(client)
|
||||
r := &snsRepository{
|
||||
client: client,
|
||||
|
|
|
@ -5,9 +5,9 @@ import (
|
|||
"testing"
|
||||
|
||||
awssdk "github.com/aws/aws-sdk-go/aws"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/sqs"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/r3labs/diff/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
@ -16,13 +16,13 @@ import (
|
|||
func Test_sqsRepository_ListAllQueues(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
mocks func(client *mocks.FakeSQS)
|
||||
mocks func(client *awstest.MockFakeSQS)
|
||||
want []*string
|
||||
wantErr error
|
||||
}{
|
||||
{
|
||||
name: "list with multiple pages",
|
||||
mocks: func(client *mocks.FakeSQS) {
|
||||
mocks: func(client *awstest.MockFakeSQS) {
|
||||
client.On("ListQueuesPages",
|
||||
&sqs.ListQueuesInput{},
|
||||
mock.MatchedBy(func(callback func(res *sqs.ListQueuesOutput, lastPage bool) bool) bool {
|
||||
|
@ -49,7 +49,7 @@ func Test_sqsRepository_ListAllQueues(t *testing.T) {
|
|||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
client := &mocks.FakeSQS{}
|
||||
client := &awstest.MockFakeSQS{}
|
||||
tt.mocks(client)
|
||||
r := &sqsRepository{
|
||||
client: client,
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -12,7 +13,6 @@ import (
|
|||
|
||||
awssdk "github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/parallel"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/deserializer"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
|
@ -29,7 +29,7 @@ func TestRouteSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ func TestRouteSupplier_Resources(t *testing.T) {
|
|||
// as a default route will always be present in each route table
|
||||
test: "no route",
|
||||
dirName: "route_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -50,7 +50,7 @@ func TestRouteSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "mixed default_route_table and route_table",
|
||||
dirName: "route",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -136,7 +136,7 @@ func TestRouteSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list route table",
|
||||
dirName: "route_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -161,7 +161,7 @@ func TestRouteSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
c.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
routeDeserializer := awsdeserializer.NewRouteDeserializer()
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -12,7 +13,6 @@ import (
|
|||
awssdk "github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/parallel"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/deserializer"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
|
@ -29,13 +29,13 @@ func TestRouteTableAssociationSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no route table associations (test for nil values)",
|
||||
dirName: "route_table_assoc_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -67,7 +67,7 @@ func TestRouteTableAssociationSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "route_table_association (mixed subnet and gateway associations)",
|
||||
dirName: "route_table_assoc",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -139,7 +139,7 @@ func TestRouteTableAssociationSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "Cannot list route table",
|
||||
dirName: "route_table_assoc_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -164,7 +164,7 @@ func TestRouteTableAssociationSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
c.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
routeTableAssociationDeserializer := awsdeserializer.NewRouteTableAssociationDeserializer()
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -13,7 +14,6 @@ import (
|
|||
"github.com/aws/aws-sdk-go/aws"
|
||||
awssdk "github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/parallel"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/deserializer"
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
|
@ -30,13 +30,13 @@ func TestRouteTableSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no route table",
|
||||
dirName: "route_table_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -49,7 +49,7 @@ func TestRouteTableSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "mixed default_route_table and route_table",
|
||||
dirName: "route_table",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -87,7 +87,7 @@ func TestRouteTableSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list route table",
|
||||
dirName: "route_table_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeRouteTablesPages",
|
||||
&ec2.DescribeRouteTablesInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeRouteTablesOutput, lastPage bool) bool) bool {
|
||||
|
@ -113,7 +113,7 @@ func TestRouteTableSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
c.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
routeTableDeserializer := awsdeserializer.NewRouteTableDeserializer()
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
|
@ -24,8 +25,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -35,13 +34,13 @@ func TestSubnetSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no Subnet",
|
||||
dirName: "subnet_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSubnetsPages",
|
||||
&ec2.DescribeSubnetsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSubnetsOutput, lastPage bool) bool) bool {
|
||||
|
@ -54,7 +53,7 @@ func TestSubnetSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "mixed default Subnet and Subnet",
|
||||
dirName: "subnet",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSubnetsPages",
|
||||
&ec2.DescribeSubnetsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSubnetsOutput, lastPage bool) bool) bool {
|
||||
|
@ -98,7 +97,7 @@ func TestSubnetSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list Subnet",
|
||||
dirName: "subnet_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSubnetsPages",
|
||||
&ec2.DescribeSubnetsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSubnetsOutput, lastPage bool) bool) bool {
|
||||
|
@ -123,7 +122,7 @@ func TestSubnetSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
c.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
SubnetDeserializer := awsdeserializer.NewSubnetDeserializer()
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
@ -22,8 +23,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -33,13 +32,13 @@ func TestVPCSecurityGroupRuleSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no security group rules",
|
||||
dirName: "vpc_security_group_rule_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSecurityGroupsPages",
|
||||
&ec2.DescribeSecurityGroupsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSecurityGroupsOutput, lastPage bool) bool) bool {
|
||||
|
@ -60,7 +59,7 @@ func TestVPCSecurityGroupRuleSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "with security group rules",
|
||||
dirName: "vpc_security_group_rule_multiple",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSecurityGroupsPages",
|
||||
&ec2.DescribeSecurityGroupsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSecurityGroupsOutput, lastPage bool) bool) bool {
|
||||
|
@ -167,7 +166,7 @@ func TestVPCSecurityGroupRuleSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "should ignore default security group default rules",
|
||||
dirName: "vpc_security_group_default_rules",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSecurityGroupsPages",
|
||||
&ec2.DescribeSecurityGroupsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSecurityGroupsOutput, lastPage bool) bool) bool {
|
||||
|
@ -223,7 +222,7 @@ func TestVPCSecurityGroupRuleSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list security group rules",
|
||||
dirName: "vpc_security_group_rule_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSecurityGroupsPages",
|
||||
&ec2.DescribeSecurityGroupsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSecurityGroupsOutput, lastPage bool) bool) bool {
|
||||
|
@ -248,7 +247,7 @@ func TestVPCSecurityGroupRuleSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
c.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
deserializer := awsdeserializer.NewVPCSecurityGroupRuleDeserializer()
|
||||
|
|
|
@ -5,13 +5,13 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
"github.com/cloudskiff/driftctl/pkg/parallel"
|
||||
"github.com/cloudskiff/driftctl/pkg/remote/deserializer"
|
||||
|
||||
|
@ -31,13 +31,13 @@ func TestVPCSecurityGroupSupplier_Resources(t *testing.T) {
|
|||
tests := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no security groups",
|
||||
dirName: "vpc_security_group_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSecurityGroupsPages",
|
||||
&ec2.DescribeSecurityGroupsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSecurityGroupsOutput, lastPage bool) bool) bool {
|
||||
|
@ -50,7 +50,7 @@ func TestVPCSecurityGroupSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "with security groups",
|
||||
dirName: "vpc_security_group_multiple",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSecurityGroupsPages",
|
||||
&ec2.DescribeSecurityGroupsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSecurityGroupsOutput, lastPage bool) bool) bool {
|
||||
|
@ -74,7 +74,7 @@ func TestVPCSecurityGroupSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list security groups",
|
||||
dirName: "vpc_security_group_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeSecurityGroupsPages",
|
||||
&ec2.DescribeSecurityGroupsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeSecurityGroupsOutput, lastPage bool) bool) bool {
|
||||
|
@ -99,7 +99,7 @@ func TestVPCSecurityGroupSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(tt.test, func(t *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
tt.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(tt.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
securityGroupDeserializer := awsdeserializer.NewVPCSecurityGroupDeserializer()
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error"
|
||||
awstest "github.com/cloudskiff/driftctl/test/aws"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
resourceaws "github.com/cloudskiff/driftctl/pkg/resource/aws"
|
||||
|
@ -23,8 +24,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
"github.com/cloudskiff/driftctl/mocks"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
"github.com/cloudskiff/driftctl/pkg/terraform"
|
||||
"github.com/cloudskiff/driftctl/test"
|
||||
|
@ -34,13 +33,13 @@ func TestVPCSupplier_Resources(t *testing.T) {
|
|||
cases := []struct {
|
||||
test string
|
||||
dirName string
|
||||
mocks func(client *mocks.FakeEC2)
|
||||
mocks func(client *awstest.MockFakeEC2)
|
||||
err error
|
||||
}{
|
||||
{
|
||||
test: "no VPC",
|
||||
dirName: "vpc_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeVpcsPages",
|
||||
&ec2.DescribeVpcsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeVpcsOutput, lastPage bool) bool) bool {
|
||||
|
@ -53,7 +52,7 @@ func TestVPCSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "mixed default VPC and VPC",
|
||||
dirName: "vpc",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeVpcsPages",
|
||||
&ec2.DescribeVpcsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeVpcsOutput, lastPage bool) bool) bool {
|
||||
|
@ -88,7 +87,7 @@ func TestVPCSupplier_Resources(t *testing.T) {
|
|||
{
|
||||
test: "cannot list VPC",
|
||||
dirName: "vpc_empty",
|
||||
mocks: func(client *mocks.FakeEC2) {
|
||||
mocks: func(client *awstest.MockFakeEC2) {
|
||||
client.On("DescribeVpcsPages",
|
||||
&ec2.DescribeVpcsInput{},
|
||||
mock.MatchedBy(func(callback func(res *ec2.DescribeVpcsOutput, lastPage bool) bool) bool {
|
||||
|
@ -113,7 +112,7 @@ func TestVPCSupplier_Resources(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run(c.test, func(tt *testing.T) {
|
||||
fakeEC2 := mocks.FakeEC2{}
|
||||
fakeEC2 := awstest.MockFakeEC2{}
|
||||
c.mocks(&fakeEC2)
|
||||
provider := mocks2.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.AWS), shouldUpdate)
|
||||
VPCDeserializer := awsdeserializer.NewVPCDeserializer()
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package aws
|
||||
|
||||
import "github.com/cloudskiff/driftctl/pkg/resource"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||
)
|
||||
|
||||
func (r *AwsInstance) NormalizeForState() (resource.Resource, error) {
|
||||
if r.RootBlockDevice != nil && len(*r.RootBlockDevice) == 0 {
|
||||
|
@ -21,3 +25,10 @@ func (r *AwsInstance) NormalizeForProvider() (resource.Resource, error) {
|
|||
}
|
||||
return r, nil
|
||||
}
|
||||
|
||||
func (r *AwsInstance) String() string {
|
||||
if name, ok := r.Tags["Name"]; ok {
|
||||
return fmt.Sprintf("%s (Name: %s)", r.TerraformId(), name)
|
||||
}
|
||||
return r.TerraformId()
|
||||
}
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
package telemetry
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"runtime"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/analyser"
|
||||
"github.com/cloudskiff/driftctl/pkg/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type telemetry struct {
|
||||
Version string `json:"version"`
|
||||
Os string `json:"os"`
|
||||
Arch string `json:"arch"`
|
||||
TotalResources int `json:"total_resources"`
|
||||
TotalManaged int `json:"total_managed"`
|
||||
Duration uint `json:"duration"`
|
||||
}
|
||||
|
||||
func SendTelemetry(analysis *analyser.Analysis) {
|
||||
|
||||
if analysis == nil {
|
||||
return
|
||||
}
|
||||
|
||||
t := telemetry{
|
||||
Version: version.Current(),
|
||||
Os: runtime.GOOS,
|
||||
Arch: runtime.GOARCH,
|
||||
TotalResources: analysis.Summary().TotalResources,
|
||||
TotalManaged: analysis.Summary().TotalManaged,
|
||||
Duration: uint(analysis.Duration.Seconds() + 0.5),
|
||||
}
|
||||
|
||||
body, err := json.Marshal(t)
|
||||
if err != nil {
|
||||
logrus.Debug(err)
|
||||
return
|
||||
}
|
||||
|
||||
client := &http.Client{}
|
||||
req, _ := http.NewRequest("POST", "https://2lvzgmrf2e.execute-api.eu-west-3.amazonaws.com/telemetry", bytes.NewReader(body))
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
|
||||
_, err = client.Do(req)
|
||||
if err != nil {
|
||||
logrus.Debugf("Unable to send telemetry data: %+v", err)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package telemetry
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/cloudskiff/driftctl/pkg/analyser"
|
||||
"github.com/cloudskiff/driftctl/pkg/version"
|
||||
"github.com/cloudskiff/driftctl/test/resource"
|
||||
"github.com/jarcoal/httpmock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSendTelemetry(t *testing.T) {
|
||||
|
||||
httpmock.Activate()
|
||||
defer httpmock.DeactivateAndReset()
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
analysis *analyser.Analysis
|
||||
expectedBody *telemetry
|
||||
response *http.Response
|
||||
}{
|
||||
{
|
||||
name: "valid analysis",
|
||||
analysis: func() *analyser.Analysis {
|
||||
a := &analyser.Analysis{}
|
||||
a.AddManaged(&resource.FakeResource{})
|
||||
a.AddUnmanaged(&resource.FakeResource{})
|
||||
a.Duration = 123.4 * 1e9 // 123.4 seconds
|
||||
return a
|
||||
}(),
|
||||
expectedBody: &telemetry{
|
||||
Version: version.Current(),
|
||||
Os: runtime.GOOS,
|
||||
Arch: runtime.GOARCH,
|
||||
TotalResources: 2,
|
||||
TotalManaged: 1,
|
||||
Duration: 123,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "valid analysis with round up",
|
||||
analysis: func() *analyser.Analysis {
|
||||
a := &analyser.Analysis{}
|
||||
a.Duration = 123.5 * 1e9 // 123.5 seconds
|
||||
return a
|
||||
}(),
|
||||
expectedBody: &telemetry{
|
||||
Version: version.Current(),
|
||||
Os: runtime.GOOS,
|
||||
Arch: runtime.GOARCH,
|
||||
Duration: 124,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "nil analysis",
|
||||
analysis: nil,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
httpmock.Reset()
|
||||
if tt.expectedBody != nil {
|
||||
httpmock.RegisterResponder(
|
||||
"POST",
|
||||
"https://2lvzgmrf2e.execute-api.eu-west-3.amazonaws.com/telemetry",
|
||||
func(req *http.Request) (*http.Response, error) {
|
||||
|
||||
requestTelemetry := &telemetry{}
|
||||
requestBody, err := ioutil.ReadAll(req.Body)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = json.Unmarshal(requestBody, requestTelemetry)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
assert.Equal(t, tt.expectedBody, requestTelemetry)
|
||||
|
||||
response := tt.response
|
||||
if response == nil {
|
||||
response = httpmock.NewBytesResponse(202, []byte{})
|
||||
}
|
||||
return response, nil
|
||||
},
|
||||
)
|
||||
}
|
||||
SendTelemetry(tt.analysis)
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
These interface wrappers are only used to generate mock.
|
||||
|
||||
You can generate a mock with `mockery --name SNSCLient --dir ./test/aws`
|
|
@ -0,0 +1,7 @@
|
|||
package aws
|
||||
|
||||
import "github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface"
|
||||
|
||||
type FakeCloudFront interface {
|
||||
cloudfrontiface.CloudFrontAPI
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package aws
|
||||
|
||||
import "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface"
|
||||
|
||||
type FakeDynamoDB interface {
|
||||
dynamodbiface.DynamoDBAPI
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package aws
|
||||
|
||||
import "github.com/aws/aws-sdk-go/service/ecr/ecriface"
|
||||
|
||||
type FakeECR interface {
|
||||
ecriface.ECRAPI
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package aws
|
||||
|
||||
import "github.com/aws/aws-sdk-go/service/kms/kmsiface"
|
||||
|
||||
type FakeKMS interface {
|
||||
kmsiface.KMSAPI
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
||||
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
package aws
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
@ -11,13 +11,13 @@ import (
|
|||
request "github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// ECRClient is an autogenerated mock type for the ECRClient type
|
||||
type ECRClient struct {
|
||||
// MockFakeECR is an autogenerated mock type for the FakeECR type
|
||||
type MockFakeECR struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// BatchCheckLayerAvailability provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) BatchCheckLayerAvailability(_a0 *ecr.BatchCheckLayerAvailabilityInput) (*ecr.BatchCheckLayerAvailabilityOutput, error) {
|
||||
func (_m *MockFakeECR) BatchCheckLayerAvailability(_a0 *ecr.BatchCheckLayerAvailabilityInput) (*ecr.BatchCheckLayerAvailabilityOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.BatchCheckLayerAvailabilityOutput
|
||||
|
@ -40,7 +40,7 @@ func (_m *ECRClient) BatchCheckLayerAvailability(_a0 *ecr.BatchCheckLayerAvailab
|
|||
}
|
||||
|
||||
// BatchCheckLayerAvailabilityRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) BatchCheckLayerAvailabilityRequest(_a0 *ecr.BatchCheckLayerAvailabilityInput) (*request.Request, *ecr.BatchCheckLayerAvailabilityOutput) {
|
||||
func (_m *MockFakeECR) BatchCheckLayerAvailabilityRequest(_a0 *ecr.BatchCheckLayerAvailabilityInput) (*request.Request, *ecr.BatchCheckLayerAvailabilityOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -65,7 +65,7 @@ func (_m *ECRClient) BatchCheckLayerAvailabilityRequest(_a0 *ecr.BatchCheckLayer
|
|||
}
|
||||
|
||||
// BatchCheckLayerAvailabilityWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) BatchCheckLayerAvailabilityWithContext(_a0 context.Context, _a1 *ecr.BatchCheckLayerAvailabilityInput, _a2 ...request.Option) (*ecr.BatchCheckLayerAvailabilityOutput, error) {
|
||||
func (_m *MockFakeECR) BatchCheckLayerAvailabilityWithContext(_a0 context.Context, _a1 *ecr.BatchCheckLayerAvailabilityInput, _a2 ...request.Option) (*ecr.BatchCheckLayerAvailabilityOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -95,7 +95,7 @@ func (_m *ECRClient) BatchCheckLayerAvailabilityWithContext(_a0 context.Context,
|
|||
}
|
||||
|
||||
// BatchDeleteImage provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) BatchDeleteImage(_a0 *ecr.BatchDeleteImageInput) (*ecr.BatchDeleteImageOutput, error) {
|
||||
func (_m *MockFakeECR) BatchDeleteImage(_a0 *ecr.BatchDeleteImageInput) (*ecr.BatchDeleteImageOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.BatchDeleteImageOutput
|
||||
|
@ -118,7 +118,7 @@ func (_m *ECRClient) BatchDeleteImage(_a0 *ecr.BatchDeleteImageInput) (*ecr.Batc
|
|||
}
|
||||
|
||||
// BatchDeleteImageRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) BatchDeleteImageRequest(_a0 *ecr.BatchDeleteImageInput) (*request.Request, *ecr.BatchDeleteImageOutput) {
|
||||
func (_m *MockFakeECR) BatchDeleteImageRequest(_a0 *ecr.BatchDeleteImageInput) (*request.Request, *ecr.BatchDeleteImageOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -143,7 +143,7 @@ func (_m *ECRClient) BatchDeleteImageRequest(_a0 *ecr.BatchDeleteImageInput) (*r
|
|||
}
|
||||
|
||||
// BatchDeleteImageWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) BatchDeleteImageWithContext(_a0 context.Context, _a1 *ecr.BatchDeleteImageInput, _a2 ...request.Option) (*ecr.BatchDeleteImageOutput, error) {
|
||||
func (_m *MockFakeECR) BatchDeleteImageWithContext(_a0 context.Context, _a1 *ecr.BatchDeleteImageInput, _a2 ...request.Option) (*ecr.BatchDeleteImageOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -173,7 +173,7 @@ func (_m *ECRClient) BatchDeleteImageWithContext(_a0 context.Context, _a1 *ecr.B
|
|||
}
|
||||
|
||||
// BatchGetImage provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) BatchGetImage(_a0 *ecr.BatchGetImageInput) (*ecr.BatchGetImageOutput, error) {
|
||||
func (_m *MockFakeECR) BatchGetImage(_a0 *ecr.BatchGetImageInput) (*ecr.BatchGetImageOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.BatchGetImageOutput
|
||||
|
@ -196,7 +196,7 @@ func (_m *ECRClient) BatchGetImage(_a0 *ecr.BatchGetImageInput) (*ecr.BatchGetIm
|
|||
}
|
||||
|
||||
// BatchGetImageRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) BatchGetImageRequest(_a0 *ecr.BatchGetImageInput) (*request.Request, *ecr.BatchGetImageOutput) {
|
||||
func (_m *MockFakeECR) BatchGetImageRequest(_a0 *ecr.BatchGetImageInput) (*request.Request, *ecr.BatchGetImageOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -221,7 +221,7 @@ func (_m *ECRClient) BatchGetImageRequest(_a0 *ecr.BatchGetImageInput) (*request
|
|||
}
|
||||
|
||||
// BatchGetImageWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) BatchGetImageWithContext(_a0 context.Context, _a1 *ecr.BatchGetImageInput, _a2 ...request.Option) (*ecr.BatchGetImageOutput, error) {
|
||||
func (_m *MockFakeECR) BatchGetImageWithContext(_a0 context.Context, _a1 *ecr.BatchGetImageInput, _a2 ...request.Option) (*ecr.BatchGetImageOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -251,7 +251,7 @@ func (_m *ECRClient) BatchGetImageWithContext(_a0 context.Context, _a1 *ecr.Batc
|
|||
}
|
||||
|
||||
// CompleteLayerUpload provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) CompleteLayerUpload(_a0 *ecr.CompleteLayerUploadInput) (*ecr.CompleteLayerUploadOutput, error) {
|
||||
func (_m *MockFakeECR) CompleteLayerUpload(_a0 *ecr.CompleteLayerUploadInput) (*ecr.CompleteLayerUploadOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.CompleteLayerUploadOutput
|
||||
|
@ -274,7 +274,7 @@ func (_m *ECRClient) CompleteLayerUpload(_a0 *ecr.CompleteLayerUploadInput) (*ec
|
|||
}
|
||||
|
||||
// CompleteLayerUploadRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) CompleteLayerUploadRequest(_a0 *ecr.CompleteLayerUploadInput) (*request.Request, *ecr.CompleteLayerUploadOutput) {
|
||||
func (_m *MockFakeECR) CompleteLayerUploadRequest(_a0 *ecr.CompleteLayerUploadInput) (*request.Request, *ecr.CompleteLayerUploadOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -299,7 +299,7 @@ func (_m *ECRClient) CompleteLayerUploadRequest(_a0 *ecr.CompleteLayerUploadInpu
|
|||
}
|
||||
|
||||
// CompleteLayerUploadWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) CompleteLayerUploadWithContext(_a0 context.Context, _a1 *ecr.CompleteLayerUploadInput, _a2 ...request.Option) (*ecr.CompleteLayerUploadOutput, error) {
|
||||
func (_m *MockFakeECR) CompleteLayerUploadWithContext(_a0 context.Context, _a1 *ecr.CompleteLayerUploadInput, _a2 ...request.Option) (*ecr.CompleteLayerUploadOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -329,7 +329,7 @@ func (_m *ECRClient) CompleteLayerUploadWithContext(_a0 context.Context, _a1 *ec
|
|||
}
|
||||
|
||||
// CreateRepository provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) CreateRepository(_a0 *ecr.CreateRepositoryInput) (*ecr.CreateRepositoryOutput, error) {
|
||||
func (_m *MockFakeECR) CreateRepository(_a0 *ecr.CreateRepositoryInput) (*ecr.CreateRepositoryOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.CreateRepositoryOutput
|
||||
|
@ -352,7 +352,7 @@ func (_m *ECRClient) CreateRepository(_a0 *ecr.CreateRepositoryInput) (*ecr.Crea
|
|||
}
|
||||
|
||||
// CreateRepositoryRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) CreateRepositoryRequest(_a0 *ecr.CreateRepositoryInput) (*request.Request, *ecr.CreateRepositoryOutput) {
|
||||
func (_m *MockFakeECR) CreateRepositoryRequest(_a0 *ecr.CreateRepositoryInput) (*request.Request, *ecr.CreateRepositoryOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -377,7 +377,7 @@ func (_m *ECRClient) CreateRepositoryRequest(_a0 *ecr.CreateRepositoryInput) (*r
|
|||
}
|
||||
|
||||
// CreateRepositoryWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) CreateRepositoryWithContext(_a0 context.Context, _a1 *ecr.CreateRepositoryInput, _a2 ...request.Option) (*ecr.CreateRepositoryOutput, error) {
|
||||
func (_m *MockFakeECR) CreateRepositoryWithContext(_a0 context.Context, _a1 *ecr.CreateRepositoryInput, _a2 ...request.Option) (*ecr.CreateRepositoryOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -407,7 +407,7 @@ func (_m *ECRClient) CreateRepositoryWithContext(_a0 context.Context, _a1 *ecr.C
|
|||
}
|
||||
|
||||
// DeleteLifecyclePolicy provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DeleteLifecyclePolicy(_a0 *ecr.DeleteLifecyclePolicyInput) (*ecr.DeleteLifecyclePolicyOutput, error) {
|
||||
func (_m *MockFakeECR) DeleteLifecyclePolicy(_a0 *ecr.DeleteLifecyclePolicyInput) (*ecr.DeleteLifecyclePolicyOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.DeleteLifecyclePolicyOutput
|
||||
|
@ -430,7 +430,7 @@ func (_m *ECRClient) DeleteLifecyclePolicy(_a0 *ecr.DeleteLifecyclePolicyInput)
|
|||
}
|
||||
|
||||
// DeleteLifecyclePolicyRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DeleteLifecyclePolicyRequest(_a0 *ecr.DeleteLifecyclePolicyInput) (*request.Request, *ecr.DeleteLifecyclePolicyOutput) {
|
||||
func (_m *MockFakeECR) DeleteLifecyclePolicyRequest(_a0 *ecr.DeleteLifecyclePolicyInput) (*request.Request, *ecr.DeleteLifecyclePolicyOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -455,7 +455,7 @@ func (_m *ECRClient) DeleteLifecyclePolicyRequest(_a0 *ecr.DeleteLifecyclePolicy
|
|||
}
|
||||
|
||||
// DeleteLifecyclePolicyWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) DeleteLifecyclePolicyWithContext(_a0 context.Context, _a1 *ecr.DeleteLifecyclePolicyInput, _a2 ...request.Option) (*ecr.DeleteLifecyclePolicyOutput, error) {
|
||||
func (_m *MockFakeECR) DeleteLifecyclePolicyWithContext(_a0 context.Context, _a1 *ecr.DeleteLifecyclePolicyInput, _a2 ...request.Option) (*ecr.DeleteLifecyclePolicyOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -485,7 +485,7 @@ func (_m *ECRClient) DeleteLifecyclePolicyWithContext(_a0 context.Context, _a1 *
|
|||
}
|
||||
|
||||
// DeleteRepository provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DeleteRepository(_a0 *ecr.DeleteRepositoryInput) (*ecr.DeleteRepositoryOutput, error) {
|
||||
func (_m *MockFakeECR) DeleteRepository(_a0 *ecr.DeleteRepositoryInput) (*ecr.DeleteRepositoryOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.DeleteRepositoryOutput
|
||||
|
@ -508,7 +508,7 @@ func (_m *ECRClient) DeleteRepository(_a0 *ecr.DeleteRepositoryInput) (*ecr.Dele
|
|||
}
|
||||
|
||||
// DeleteRepositoryPolicy provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DeleteRepositoryPolicy(_a0 *ecr.DeleteRepositoryPolicyInput) (*ecr.DeleteRepositoryPolicyOutput, error) {
|
||||
func (_m *MockFakeECR) DeleteRepositoryPolicy(_a0 *ecr.DeleteRepositoryPolicyInput) (*ecr.DeleteRepositoryPolicyOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.DeleteRepositoryPolicyOutput
|
||||
|
@ -531,7 +531,7 @@ func (_m *ECRClient) DeleteRepositoryPolicy(_a0 *ecr.DeleteRepositoryPolicyInput
|
|||
}
|
||||
|
||||
// DeleteRepositoryPolicyRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DeleteRepositoryPolicyRequest(_a0 *ecr.DeleteRepositoryPolicyInput) (*request.Request, *ecr.DeleteRepositoryPolicyOutput) {
|
||||
func (_m *MockFakeECR) DeleteRepositoryPolicyRequest(_a0 *ecr.DeleteRepositoryPolicyInput) (*request.Request, *ecr.DeleteRepositoryPolicyOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -556,7 +556,7 @@ func (_m *ECRClient) DeleteRepositoryPolicyRequest(_a0 *ecr.DeleteRepositoryPoli
|
|||
}
|
||||
|
||||
// DeleteRepositoryPolicyWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) DeleteRepositoryPolicyWithContext(_a0 context.Context, _a1 *ecr.DeleteRepositoryPolicyInput, _a2 ...request.Option) (*ecr.DeleteRepositoryPolicyOutput, error) {
|
||||
func (_m *MockFakeECR) DeleteRepositoryPolicyWithContext(_a0 context.Context, _a1 *ecr.DeleteRepositoryPolicyInput, _a2 ...request.Option) (*ecr.DeleteRepositoryPolicyOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -586,7 +586,7 @@ func (_m *ECRClient) DeleteRepositoryPolicyWithContext(_a0 context.Context, _a1
|
|||
}
|
||||
|
||||
// DeleteRepositoryRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DeleteRepositoryRequest(_a0 *ecr.DeleteRepositoryInput) (*request.Request, *ecr.DeleteRepositoryOutput) {
|
||||
func (_m *MockFakeECR) DeleteRepositoryRequest(_a0 *ecr.DeleteRepositoryInput) (*request.Request, *ecr.DeleteRepositoryOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -611,7 +611,7 @@ func (_m *ECRClient) DeleteRepositoryRequest(_a0 *ecr.DeleteRepositoryInput) (*r
|
|||
}
|
||||
|
||||
// DeleteRepositoryWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) DeleteRepositoryWithContext(_a0 context.Context, _a1 *ecr.DeleteRepositoryInput, _a2 ...request.Option) (*ecr.DeleteRepositoryOutput, error) {
|
||||
func (_m *MockFakeECR) DeleteRepositoryWithContext(_a0 context.Context, _a1 *ecr.DeleteRepositoryInput, _a2 ...request.Option) (*ecr.DeleteRepositoryOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -641,7 +641,7 @@ func (_m *ECRClient) DeleteRepositoryWithContext(_a0 context.Context, _a1 *ecr.D
|
|||
}
|
||||
|
||||
// DescribeImageScanFindings provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DescribeImageScanFindings(_a0 *ecr.DescribeImageScanFindingsInput) (*ecr.DescribeImageScanFindingsOutput, error) {
|
||||
func (_m *MockFakeECR) DescribeImageScanFindings(_a0 *ecr.DescribeImageScanFindingsInput) (*ecr.DescribeImageScanFindingsOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.DescribeImageScanFindingsOutput
|
||||
|
@ -664,7 +664,7 @@ func (_m *ECRClient) DescribeImageScanFindings(_a0 *ecr.DescribeImageScanFinding
|
|||
}
|
||||
|
||||
// DescribeImageScanFindingsPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *ECRClient) DescribeImageScanFindingsPages(_a0 *ecr.DescribeImageScanFindingsInput, _a1 func(*ecr.DescribeImageScanFindingsOutput, bool) bool) error {
|
||||
func (_m *MockFakeECR) DescribeImageScanFindingsPages(_a0 *ecr.DescribeImageScanFindingsInput, _a1 func(*ecr.DescribeImageScanFindingsOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -678,7 +678,7 @@ func (_m *ECRClient) DescribeImageScanFindingsPages(_a0 *ecr.DescribeImageScanFi
|
|||
}
|
||||
|
||||
// DescribeImageScanFindingsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *ECRClient) DescribeImageScanFindingsPagesWithContext(_a0 context.Context, _a1 *ecr.DescribeImageScanFindingsInput, _a2 func(*ecr.DescribeImageScanFindingsOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeECR) DescribeImageScanFindingsPagesWithContext(_a0 context.Context, _a1 *ecr.DescribeImageScanFindingsInput, _a2 func(*ecr.DescribeImageScanFindingsOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -699,7 +699,7 @@ func (_m *ECRClient) DescribeImageScanFindingsPagesWithContext(_a0 context.Conte
|
|||
}
|
||||
|
||||
// DescribeImageScanFindingsRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DescribeImageScanFindingsRequest(_a0 *ecr.DescribeImageScanFindingsInput) (*request.Request, *ecr.DescribeImageScanFindingsOutput) {
|
||||
func (_m *MockFakeECR) DescribeImageScanFindingsRequest(_a0 *ecr.DescribeImageScanFindingsInput) (*request.Request, *ecr.DescribeImageScanFindingsOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -724,7 +724,7 @@ func (_m *ECRClient) DescribeImageScanFindingsRequest(_a0 *ecr.DescribeImageScan
|
|||
}
|
||||
|
||||
// DescribeImageScanFindingsWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) DescribeImageScanFindingsWithContext(_a0 context.Context, _a1 *ecr.DescribeImageScanFindingsInput, _a2 ...request.Option) (*ecr.DescribeImageScanFindingsOutput, error) {
|
||||
func (_m *MockFakeECR) DescribeImageScanFindingsWithContext(_a0 context.Context, _a1 *ecr.DescribeImageScanFindingsInput, _a2 ...request.Option) (*ecr.DescribeImageScanFindingsOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -754,7 +754,7 @@ func (_m *ECRClient) DescribeImageScanFindingsWithContext(_a0 context.Context, _
|
|||
}
|
||||
|
||||
// DescribeImages provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DescribeImages(_a0 *ecr.DescribeImagesInput) (*ecr.DescribeImagesOutput, error) {
|
||||
func (_m *MockFakeECR) DescribeImages(_a0 *ecr.DescribeImagesInput) (*ecr.DescribeImagesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.DescribeImagesOutput
|
||||
|
@ -777,7 +777,7 @@ func (_m *ECRClient) DescribeImages(_a0 *ecr.DescribeImagesInput) (*ecr.Describe
|
|||
}
|
||||
|
||||
// DescribeImagesPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *ECRClient) DescribeImagesPages(_a0 *ecr.DescribeImagesInput, _a1 func(*ecr.DescribeImagesOutput, bool) bool) error {
|
||||
func (_m *MockFakeECR) DescribeImagesPages(_a0 *ecr.DescribeImagesInput, _a1 func(*ecr.DescribeImagesOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -791,7 +791,7 @@ func (_m *ECRClient) DescribeImagesPages(_a0 *ecr.DescribeImagesInput, _a1 func(
|
|||
}
|
||||
|
||||
// DescribeImagesPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *ECRClient) DescribeImagesPagesWithContext(_a0 context.Context, _a1 *ecr.DescribeImagesInput, _a2 func(*ecr.DescribeImagesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeECR) DescribeImagesPagesWithContext(_a0 context.Context, _a1 *ecr.DescribeImagesInput, _a2 func(*ecr.DescribeImagesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -812,7 +812,7 @@ func (_m *ECRClient) DescribeImagesPagesWithContext(_a0 context.Context, _a1 *ec
|
|||
}
|
||||
|
||||
// DescribeImagesRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DescribeImagesRequest(_a0 *ecr.DescribeImagesInput) (*request.Request, *ecr.DescribeImagesOutput) {
|
||||
func (_m *MockFakeECR) DescribeImagesRequest(_a0 *ecr.DescribeImagesInput) (*request.Request, *ecr.DescribeImagesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -837,7 +837,7 @@ func (_m *ECRClient) DescribeImagesRequest(_a0 *ecr.DescribeImagesInput) (*reque
|
|||
}
|
||||
|
||||
// DescribeImagesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) DescribeImagesWithContext(_a0 context.Context, _a1 *ecr.DescribeImagesInput, _a2 ...request.Option) (*ecr.DescribeImagesOutput, error) {
|
||||
func (_m *MockFakeECR) DescribeImagesWithContext(_a0 context.Context, _a1 *ecr.DescribeImagesInput, _a2 ...request.Option) (*ecr.DescribeImagesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -867,7 +867,7 @@ func (_m *ECRClient) DescribeImagesWithContext(_a0 context.Context, _a1 *ecr.Des
|
|||
}
|
||||
|
||||
// DescribeRepositories provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DescribeRepositories(_a0 *ecr.DescribeRepositoriesInput) (*ecr.DescribeRepositoriesOutput, error) {
|
||||
func (_m *MockFakeECR) DescribeRepositories(_a0 *ecr.DescribeRepositoriesInput) (*ecr.DescribeRepositoriesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.DescribeRepositoriesOutput
|
||||
|
@ -890,7 +890,7 @@ func (_m *ECRClient) DescribeRepositories(_a0 *ecr.DescribeRepositoriesInput) (*
|
|||
}
|
||||
|
||||
// DescribeRepositoriesPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *ECRClient) DescribeRepositoriesPages(_a0 *ecr.DescribeRepositoriesInput, _a1 func(*ecr.DescribeRepositoriesOutput, bool) bool) error {
|
||||
func (_m *MockFakeECR) DescribeRepositoriesPages(_a0 *ecr.DescribeRepositoriesInput, _a1 func(*ecr.DescribeRepositoriesOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -904,7 +904,7 @@ func (_m *ECRClient) DescribeRepositoriesPages(_a0 *ecr.DescribeRepositoriesInpu
|
|||
}
|
||||
|
||||
// DescribeRepositoriesPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *ECRClient) DescribeRepositoriesPagesWithContext(_a0 context.Context, _a1 *ecr.DescribeRepositoriesInput, _a2 func(*ecr.DescribeRepositoriesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeECR) DescribeRepositoriesPagesWithContext(_a0 context.Context, _a1 *ecr.DescribeRepositoriesInput, _a2 func(*ecr.DescribeRepositoriesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -925,7 +925,7 @@ func (_m *ECRClient) DescribeRepositoriesPagesWithContext(_a0 context.Context, _
|
|||
}
|
||||
|
||||
// DescribeRepositoriesRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) DescribeRepositoriesRequest(_a0 *ecr.DescribeRepositoriesInput) (*request.Request, *ecr.DescribeRepositoriesOutput) {
|
||||
func (_m *MockFakeECR) DescribeRepositoriesRequest(_a0 *ecr.DescribeRepositoriesInput) (*request.Request, *ecr.DescribeRepositoriesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -950,7 +950,7 @@ func (_m *ECRClient) DescribeRepositoriesRequest(_a0 *ecr.DescribeRepositoriesIn
|
|||
}
|
||||
|
||||
// DescribeRepositoriesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) DescribeRepositoriesWithContext(_a0 context.Context, _a1 *ecr.DescribeRepositoriesInput, _a2 ...request.Option) (*ecr.DescribeRepositoriesOutput, error) {
|
||||
func (_m *MockFakeECR) DescribeRepositoriesWithContext(_a0 context.Context, _a1 *ecr.DescribeRepositoriesInput, _a2 ...request.Option) (*ecr.DescribeRepositoriesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -980,7 +980,7 @@ func (_m *ECRClient) DescribeRepositoriesWithContext(_a0 context.Context, _a1 *e
|
|||
}
|
||||
|
||||
// GetAuthorizationToken provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetAuthorizationToken(_a0 *ecr.GetAuthorizationTokenInput) (*ecr.GetAuthorizationTokenOutput, error) {
|
||||
func (_m *MockFakeECR) GetAuthorizationToken(_a0 *ecr.GetAuthorizationTokenInput) (*ecr.GetAuthorizationTokenOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.GetAuthorizationTokenOutput
|
||||
|
@ -1003,7 +1003,7 @@ func (_m *ECRClient) GetAuthorizationToken(_a0 *ecr.GetAuthorizationTokenInput)
|
|||
}
|
||||
|
||||
// GetAuthorizationTokenRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetAuthorizationTokenRequest(_a0 *ecr.GetAuthorizationTokenInput) (*request.Request, *ecr.GetAuthorizationTokenOutput) {
|
||||
func (_m *MockFakeECR) GetAuthorizationTokenRequest(_a0 *ecr.GetAuthorizationTokenInput) (*request.Request, *ecr.GetAuthorizationTokenOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1028,7 +1028,7 @@ func (_m *ECRClient) GetAuthorizationTokenRequest(_a0 *ecr.GetAuthorizationToken
|
|||
}
|
||||
|
||||
// GetAuthorizationTokenWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) GetAuthorizationTokenWithContext(_a0 context.Context, _a1 *ecr.GetAuthorizationTokenInput, _a2 ...request.Option) (*ecr.GetAuthorizationTokenOutput, error) {
|
||||
func (_m *MockFakeECR) GetAuthorizationTokenWithContext(_a0 context.Context, _a1 *ecr.GetAuthorizationTokenInput, _a2 ...request.Option) (*ecr.GetAuthorizationTokenOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1058,7 +1058,7 @@ func (_m *ECRClient) GetAuthorizationTokenWithContext(_a0 context.Context, _a1 *
|
|||
}
|
||||
|
||||
// GetDownloadUrlForLayer provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetDownloadUrlForLayer(_a0 *ecr.GetDownloadUrlForLayerInput) (*ecr.GetDownloadUrlForLayerOutput, error) {
|
||||
func (_m *MockFakeECR) GetDownloadUrlForLayer(_a0 *ecr.GetDownloadUrlForLayerInput) (*ecr.GetDownloadUrlForLayerOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.GetDownloadUrlForLayerOutput
|
||||
|
@ -1081,7 +1081,7 @@ func (_m *ECRClient) GetDownloadUrlForLayer(_a0 *ecr.GetDownloadUrlForLayerInput
|
|||
}
|
||||
|
||||
// GetDownloadUrlForLayerRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetDownloadUrlForLayerRequest(_a0 *ecr.GetDownloadUrlForLayerInput) (*request.Request, *ecr.GetDownloadUrlForLayerOutput) {
|
||||
func (_m *MockFakeECR) GetDownloadUrlForLayerRequest(_a0 *ecr.GetDownloadUrlForLayerInput) (*request.Request, *ecr.GetDownloadUrlForLayerOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1106,7 +1106,7 @@ func (_m *ECRClient) GetDownloadUrlForLayerRequest(_a0 *ecr.GetDownloadUrlForLay
|
|||
}
|
||||
|
||||
// GetDownloadUrlForLayerWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) GetDownloadUrlForLayerWithContext(_a0 context.Context, _a1 *ecr.GetDownloadUrlForLayerInput, _a2 ...request.Option) (*ecr.GetDownloadUrlForLayerOutput, error) {
|
||||
func (_m *MockFakeECR) GetDownloadUrlForLayerWithContext(_a0 context.Context, _a1 *ecr.GetDownloadUrlForLayerInput, _a2 ...request.Option) (*ecr.GetDownloadUrlForLayerOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1136,7 +1136,7 @@ func (_m *ECRClient) GetDownloadUrlForLayerWithContext(_a0 context.Context, _a1
|
|||
}
|
||||
|
||||
// GetLifecyclePolicy provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetLifecyclePolicy(_a0 *ecr.GetLifecyclePolicyInput) (*ecr.GetLifecyclePolicyOutput, error) {
|
||||
func (_m *MockFakeECR) GetLifecyclePolicy(_a0 *ecr.GetLifecyclePolicyInput) (*ecr.GetLifecyclePolicyOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.GetLifecyclePolicyOutput
|
||||
|
@ -1159,7 +1159,7 @@ func (_m *ECRClient) GetLifecyclePolicy(_a0 *ecr.GetLifecyclePolicyInput) (*ecr.
|
|||
}
|
||||
|
||||
// GetLifecyclePolicyPreview provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetLifecyclePolicyPreview(_a0 *ecr.GetLifecyclePolicyPreviewInput) (*ecr.GetLifecyclePolicyPreviewOutput, error) {
|
||||
func (_m *MockFakeECR) GetLifecyclePolicyPreview(_a0 *ecr.GetLifecyclePolicyPreviewInput) (*ecr.GetLifecyclePolicyPreviewOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.GetLifecyclePolicyPreviewOutput
|
||||
|
@ -1182,7 +1182,7 @@ func (_m *ECRClient) GetLifecyclePolicyPreview(_a0 *ecr.GetLifecyclePolicyPrevie
|
|||
}
|
||||
|
||||
// GetLifecyclePolicyPreviewPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *ECRClient) GetLifecyclePolicyPreviewPages(_a0 *ecr.GetLifecyclePolicyPreviewInput, _a1 func(*ecr.GetLifecyclePolicyPreviewOutput, bool) bool) error {
|
||||
func (_m *MockFakeECR) GetLifecyclePolicyPreviewPages(_a0 *ecr.GetLifecyclePolicyPreviewInput, _a1 func(*ecr.GetLifecyclePolicyPreviewOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -1196,7 +1196,7 @@ func (_m *ECRClient) GetLifecyclePolicyPreviewPages(_a0 *ecr.GetLifecyclePolicyP
|
|||
}
|
||||
|
||||
// GetLifecyclePolicyPreviewPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *ECRClient) GetLifecyclePolicyPreviewPagesWithContext(_a0 context.Context, _a1 *ecr.GetLifecyclePolicyPreviewInput, _a2 func(*ecr.GetLifecyclePolicyPreviewOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeECR) GetLifecyclePolicyPreviewPagesWithContext(_a0 context.Context, _a1 *ecr.GetLifecyclePolicyPreviewInput, _a2 func(*ecr.GetLifecyclePolicyPreviewOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -1217,7 +1217,7 @@ func (_m *ECRClient) GetLifecyclePolicyPreviewPagesWithContext(_a0 context.Conte
|
|||
}
|
||||
|
||||
// GetLifecyclePolicyPreviewRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetLifecyclePolicyPreviewRequest(_a0 *ecr.GetLifecyclePolicyPreviewInput) (*request.Request, *ecr.GetLifecyclePolicyPreviewOutput) {
|
||||
func (_m *MockFakeECR) GetLifecyclePolicyPreviewRequest(_a0 *ecr.GetLifecyclePolicyPreviewInput) (*request.Request, *ecr.GetLifecyclePolicyPreviewOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1242,7 +1242,7 @@ func (_m *ECRClient) GetLifecyclePolicyPreviewRequest(_a0 *ecr.GetLifecyclePolic
|
|||
}
|
||||
|
||||
// GetLifecyclePolicyPreviewWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) GetLifecyclePolicyPreviewWithContext(_a0 context.Context, _a1 *ecr.GetLifecyclePolicyPreviewInput, _a2 ...request.Option) (*ecr.GetLifecyclePolicyPreviewOutput, error) {
|
||||
func (_m *MockFakeECR) GetLifecyclePolicyPreviewWithContext(_a0 context.Context, _a1 *ecr.GetLifecyclePolicyPreviewInput, _a2 ...request.Option) (*ecr.GetLifecyclePolicyPreviewOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1272,7 +1272,7 @@ func (_m *ECRClient) GetLifecyclePolicyPreviewWithContext(_a0 context.Context, _
|
|||
}
|
||||
|
||||
// GetLifecyclePolicyRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetLifecyclePolicyRequest(_a0 *ecr.GetLifecyclePolicyInput) (*request.Request, *ecr.GetLifecyclePolicyOutput) {
|
||||
func (_m *MockFakeECR) GetLifecyclePolicyRequest(_a0 *ecr.GetLifecyclePolicyInput) (*request.Request, *ecr.GetLifecyclePolicyOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1297,7 +1297,7 @@ func (_m *ECRClient) GetLifecyclePolicyRequest(_a0 *ecr.GetLifecyclePolicyInput)
|
|||
}
|
||||
|
||||
// GetLifecyclePolicyWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) GetLifecyclePolicyWithContext(_a0 context.Context, _a1 *ecr.GetLifecyclePolicyInput, _a2 ...request.Option) (*ecr.GetLifecyclePolicyOutput, error) {
|
||||
func (_m *MockFakeECR) GetLifecyclePolicyWithContext(_a0 context.Context, _a1 *ecr.GetLifecyclePolicyInput, _a2 ...request.Option) (*ecr.GetLifecyclePolicyOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1327,7 +1327,7 @@ func (_m *ECRClient) GetLifecyclePolicyWithContext(_a0 context.Context, _a1 *ecr
|
|||
}
|
||||
|
||||
// GetRepositoryPolicy provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetRepositoryPolicy(_a0 *ecr.GetRepositoryPolicyInput) (*ecr.GetRepositoryPolicyOutput, error) {
|
||||
func (_m *MockFakeECR) GetRepositoryPolicy(_a0 *ecr.GetRepositoryPolicyInput) (*ecr.GetRepositoryPolicyOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.GetRepositoryPolicyOutput
|
||||
|
@ -1350,7 +1350,7 @@ func (_m *ECRClient) GetRepositoryPolicy(_a0 *ecr.GetRepositoryPolicyInput) (*ec
|
|||
}
|
||||
|
||||
// GetRepositoryPolicyRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) GetRepositoryPolicyRequest(_a0 *ecr.GetRepositoryPolicyInput) (*request.Request, *ecr.GetRepositoryPolicyOutput) {
|
||||
func (_m *MockFakeECR) GetRepositoryPolicyRequest(_a0 *ecr.GetRepositoryPolicyInput) (*request.Request, *ecr.GetRepositoryPolicyOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1375,7 +1375,7 @@ func (_m *ECRClient) GetRepositoryPolicyRequest(_a0 *ecr.GetRepositoryPolicyInpu
|
|||
}
|
||||
|
||||
// GetRepositoryPolicyWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) GetRepositoryPolicyWithContext(_a0 context.Context, _a1 *ecr.GetRepositoryPolicyInput, _a2 ...request.Option) (*ecr.GetRepositoryPolicyOutput, error) {
|
||||
func (_m *MockFakeECR) GetRepositoryPolicyWithContext(_a0 context.Context, _a1 *ecr.GetRepositoryPolicyInput, _a2 ...request.Option) (*ecr.GetRepositoryPolicyOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1405,7 +1405,7 @@ func (_m *ECRClient) GetRepositoryPolicyWithContext(_a0 context.Context, _a1 *ec
|
|||
}
|
||||
|
||||
// InitiateLayerUpload provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) InitiateLayerUpload(_a0 *ecr.InitiateLayerUploadInput) (*ecr.InitiateLayerUploadOutput, error) {
|
||||
func (_m *MockFakeECR) InitiateLayerUpload(_a0 *ecr.InitiateLayerUploadInput) (*ecr.InitiateLayerUploadOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.InitiateLayerUploadOutput
|
||||
|
@ -1428,7 +1428,7 @@ func (_m *ECRClient) InitiateLayerUpload(_a0 *ecr.InitiateLayerUploadInput) (*ec
|
|||
}
|
||||
|
||||
// InitiateLayerUploadRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) InitiateLayerUploadRequest(_a0 *ecr.InitiateLayerUploadInput) (*request.Request, *ecr.InitiateLayerUploadOutput) {
|
||||
func (_m *MockFakeECR) InitiateLayerUploadRequest(_a0 *ecr.InitiateLayerUploadInput) (*request.Request, *ecr.InitiateLayerUploadOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1453,7 +1453,7 @@ func (_m *ECRClient) InitiateLayerUploadRequest(_a0 *ecr.InitiateLayerUploadInpu
|
|||
}
|
||||
|
||||
// InitiateLayerUploadWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) InitiateLayerUploadWithContext(_a0 context.Context, _a1 *ecr.InitiateLayerUploadInput, _a2 ...request.Option) (*ecr.InitiateLayerUploadOutput, error) {
|
||||
func (_m *MockFakeECR) InitiateLayerUploadWithContext(_a0 context.Context, _a1 *ecr.InitiateLayerUploadInput, _a2 ...request.Option) (*ecr.InitiateLayerUploadOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1483,7 +1483,7 @@ func (_m *ECRClient) InitiateLayerUploadWithContext(_a0 context.Context, _a1 *ec
|
|||
}
|
||||
|
||||
// ListImages provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) ListImages(_a0 *ecr.ListImagesInput) (*ecr.ListImagesOutput, error) {
|
||||
func (_m *MockFakeECR) ListImages(_a0 *ecr.ListImagesInput) (*ecr.ListImagesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.ListImagesOutput
|
||||
|
@ -1506,7 +1506,7 @@ func (_m *ECRClient) ListImages(_a0 *ecr.ListImagesInput) (*ecr.ListImagesOutput
|
|||
}
|
||||
|
||||
// ListImagesPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *ECRClient) ListImagesPages(_a0 *ecr.ListImagesInput, _a1 func(*ecr.ListImagesOutput, bool) bool) error {
|
||||
func (_m *MockFakeECR) ListImagesPages(_a0 *ecr.ListImagesInput, _a1 func(*ecr.ListImagesOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -1520,7 +1520,7 @@ func (_m *ECRClient) ListImagesPages(_a0 *ecr.ListImagesInput, _a1 func(*ecr.Lis
|
|||
}
|
||||
|
||||
// ListImagesPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *ECRClient) ListImagesPagesWithContext(_a0 context.Context, _a1 *ecr.ListImagesInput, _a2 func(*ecr.ListImagesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeECR) ListImagesPagesWithContext(_a0 context.Context, _a1 *ecr.ListImagesInput, _a2 func(*ecr.ListImagesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -1541,7 +1541,7 @@ func (_m *ECRClient) ListImagesPagesWithContext(_a0 context.Context, _a1 *ecr.Li
|
|||
}
|
||||
|
||||
// ListImagesRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) ListImagesRequest(_a0 *ecr.ListImagesInput) (*request.Request, *ecr.ListImagesOutput) {
|
||||
func (_m *MockFakeECR) ListImagesRequest(_a0 *ecr.ListImagesInput) (*request.Request, *ecr.ListImagesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1566,7 +1566,7 @@ func (_m *ECRClient) ListImagesRequest(_a0 *ecr.ListImagesInput) (*request.Reque
|
|||
}
|
||||
|
||||
// ListImagesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) ListImagesWithContext(_a0 context.Context, _a1 *ecr.ListImagesInput, _a2 ...request.Option) (*ecr.ListImagesOutput, error) {
|
||||
func (_m *MockFakeECR) ListImagesWithContext(_a0 context.Context, _a1 *ecr.ListImagesInput, _a2 ...request.Option) (*ecr.ListImagesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1596,7 +1596,7 @@ func (_m *ECRClient) ListImagesWithContext(_a0 context.Context, _a1 *ecr.ListIma
|
|||
}
|
||||
|
||||
// ListTagsForResource provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) ListTagsForResource(_a0 *ecr.ListTagsForResourceInput) (*ecr.ListTagsForResourceOutput, error) {
|
||||
func (_m *MockFakeECR) ListTagsForResource(_a0 *ecr.ListTagsForResourceInput) (*ecr.ListTagsForResourceOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.ListTagsForResourceOutput
|
||||
|
@ -1619,7 +1619,7 @@ func (_m *ECRClient) ListTagsForResource(_a0 *ecr.ListTagsForResourceInput) (*ec
|
|||
}
|
||||
|
||||
// ListTagsForResourceRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) ListTagsForResourceRequest(_a0 *ecr.ListTagsForResourceInput) (*request.Request, *ecr.ListTagsForResourceOutput) {
|
||||
func (_m *MockFakeECR) ListTagsForResourceRequest(_a0 *ecr.ListTagsForResourceInput) (*request.Request, *ecr.ListTagsForResourceOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1644,7 +1644,7 @@ func (_m *ECRClient) ListTagsForResourceRequest(_a0 *ecr.ListTagsForResourceInpu
|
|||
}
|
||||
|
||||
// ListTagsForResourceWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) ListTagsForResourceWithContext(_a0 context.Context, _a1 *ecr.ListTagsForResourceInput, _a2 ...request.Option) (*ecr.ListTagsForResourceOutput, error) {
|
||||
func (_m *MockFakeECR) ListTagsForResourceWithContext(_a0 context.Context, _a1 *ecr.ListTagsForResourceInput, _a2 ...request.Option) (*ecr.ListTagsForResourceOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1674,7 +1674,7 @@ func (_m *ECRClient) ListTagsForResourceWithContext(_a0 context.Context, _a1 *ec
|
|||
}
|
||||
|
||||
// PutImage provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) PutImage(_a0 *ecr.PutImageInput) (*ecr.PutImageOutput, error) {
|
||||
func (_m *MockFakeECR) PutImage(_a0 *ecr.PutImageInput) (*ecr.PutImageOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.PutImageOutput
|
||||
|
@ -1697,7 +1697,7 @@ func (_m *ECRClient) PutImage(_a0 *ecr.PutImageInput) (*ecr.PutImageOutput, erro
|
|||
}
|
||||
|
||||
// PutImageRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) PutImageRequest(_a0 *ecr.PutImageInput) (*request.Request, *ecr.PutImageOutput) {
|
||||
func (_m *MockFakeECR) PutImageRequest(_a0 *ecr.PutImageInput) (*request.Request, *ecr.PutImageOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1722,7 +1722,7 @@ func (_m *ECRClient) PutImageRequest(_a0 *ecr.PutImageInput) (*request.Request,
|
|||
}
|
||||
|
||||
// PutImageScanningConfiguration provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) PutImageScanningConfiguration(_a0 *ecr.PutImageScanningConfigurationInput) (*ecr.PutImageScanningConfigurationOutput, error) {
|
||||
func (_m *MockFakeECR) PutImageScanningConfiguration(_a0 *ecr.PutImageScanningConfigurationInput) (*ecr.PutImageScanningConfigurationOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.PutImageScanningConfigurationOutput
|
||||
|
@ -1745,7 +1745,7 @@ func (_m *ECRClient) PutImageScanningConfiguration(_a0 *ecr.PutImageScanningConf
|
|||
}
|
||||
|
||||
// PutImageScanningConfigurationRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) PutImageScanningConfigurationRequest(_a0 *ecr.PutImageScanningConfigurationInput) (*request.Request, *ecr.PutImageScanningConfigurationOutput) {
|
||||
func (_m *MockFakeECR) PutImageScanningConfigurationRequest(_a0 *ecr.PutImageScanningConfigurationInput) (*request.Request, *ecr.PutImageScanningConfigurationOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1770,7 +1770,7 @@ func (_m *ECRClient) PutImageScanningConfigurationRequest(_a0 *ecr.PutImageScann
|
|||
}
|
||||
|
||||
// PutImageScanningConfigurationWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) PutImageScanningConfigurationWithContext(_a0 context.Context, _a1 *ecr.PutImageScanningConfigurationInput, _a2 ...request.Option) (*ecr.PutImageScanningConfigurationOutput, error) {
|
||||
func (_m *MockFakeECR) PutImageScanningConfigurationWithContext(_a0 context.Context, _a1 *ecr.PutImageScanningConfigurationInput, _a2 ...request.Option) (*ecr.PutImageScanningConfigurationOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1800,7 +1800,7 @@ func (_m *ECRClient) PutImageScanningConfigurationWithContext(_a0 context.Contex
|
|||
}
|
||||
|
||||
// PutImageTagMutability provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) PutImageTagMutability(_a0 *ecr.PutImageTagMutabilityInput) (*ecr.PutImageTagMutabilityOutput, error) {
|
||||
func (_m *MockFakeECR) PutImageTagMutability(_a0 *ecr.PutImageTagMutabilityInput) (*ecr.PutImageTagMutabilityOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.PutImageTagMutabilityOutput
|
||||
|
@ -1823,7 +1823,7 @@ func (_m *ECRClient) PutImageTagMutability(_a0 *ecr.PutImageTagMutabilityInput)
|
|||
}
|
||||
|
||||
// PutImageTagMutabilityRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) PutImageTagMutabilityRequest(_a0 *ecr.PutImageTagMutabilityInput) (*request.Request, *ecr.PutImageTagMutabilityOutput) {
|
||||
func (_m *MockFakeECR) PutImageTagMutabilityRequest(_a0 *ecr.PutImageTagMutabilityInput) (*request.Request, *ecr.PutImageTagMutabilityOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1848,7 +1848,7 @@ func (_m *ECRClient) PutImageTagMutabilityRequest(_a0 *ecr.PutImageTagMutability
|
|||
}
|
||||
|
||||
// PutImageTagMutabilityWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) PutImageTagMutabilityWithContext(_a0 context.Context, _a1 *ecr.PutImageTagMutabilityInput, _a2 ...request.Option) (*ecr.PutImageTagMutabilityOutput, error) {
|
||||
func (_m *MockFakeECR) PutImageTagMutabilityWithContext(_a0 context.Context, _a1 *ecr.PutImageTagMutabilityInput, _a2 ...request.Option) (*ecr.PutImageTagMutabilityOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1878,7 +1878,7 @@ func (_m *ECRClient) PutImageTagMutabilityWithContext(_a0 context.Context, _a1 *
|
|||
}
|
||||
|
||||
// PutImageWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) PutImageWithContext(_a0 context.Context, _a1 *ecr.PutImageInput, _a2 ...request.Option) (*ecr.PutImageOutput, error) {
|
||||
func (_m *MockFakeECR) PutImageWithContext(_a0 context.Context, _a1 *ecr.PutImageInput, _a2 ...request.Option) (*ecr.PutImageOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1908,7 +1908,7 @@ func (_m *ECRClient) PutImageWithContext(_a0 context.Context, _a1 *ecr.PutImageI
|
|||
}
|
||||
|
||||
// PutLifecyclePolicy provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) PutLifecyclePolicy(_a0 *ecr.PutLifecyclePolicyInput) (*ecr.PutLifecyclePolicyOutput, error) {
|
||||
func (_m *MockFakeECR) PutLifecyclePolicy(_a0 *ecr.PutLifecyclePolicyInput) (*ecr.PutLifecyclePolicyOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.PutLifecyclePolicyOutput
|
||||
|
@ -1931,7 +1931,7 @@ func (_m *ECRClient) PutLifecyclePolicy(_a0 *ecr.PutLifecyclePolicyInput) (*ecr.
|
|||
}
|
||||
|
||||
// PutLifecyclePolicyRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) PutLifecyclePolicyRequest(_a0 *ecr.PutLifecyclePolicyInput) (*request.Request, *ecr.PutLifecyclePolicyOutput) {
|
||||
func (_m *MockFakeECR) PutLifecyclePolicyRequest(_a0 *ecr.PutLifecyclePolicyInput) (*request.Request, *ecr.PutLifecyclePolicyOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1956,7 +1956,7 @@ func (_m *ECRClient) PutLifecyclePolicyRequest(_a0 *ecr.PutLifecyclePolicyInput)
|
|||
}
|
||||
|
||||
// PutLifecyclePolicyWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) PutLifecyclePolicyWithContext(_a0 context.Context, _a1 *ecr.PutLifecyclePolicyInput, _a2 ...request.Option) (*ecr.PutLifecyclePolicyOutput, error) {
|
||||
func (_m *MockFakeECR) PutLifecyclePolicyWithContext(_a0 context.Context, _a1 *ecr.PutLifecyclePolicyInput, _a2 ...request.Option) (*ecr.PutLifecyclePolicyOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1986,7 +1986,7 @@ func (_m *ECRClient) PutLifecyclePolicyWithContext(_a0 context.Context, _a1 *ecr
|
|||
}
|
||||
|
||||
// SetRepositoryPolicy provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) SetRepositoryPolicy(_a0 *ecr.SetRepositoryPolicyInput) (*ecr.SetRepositoryPolicyOutput, error) {
|
||||
func (_m *MockFakeECR) SetRepositoryPolicy(_a0 *ecr.SetRepositoryPolicyInput) (*ecr.SetRepositoryPolicyOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.SetRepositoryPolicyOutput
|
||||
|
@ -2009,7 +2009,7 @@ func (_m *ECRClient) SetRepositoryPolicy(_a0 *ecr.SetRepositoryPolicyInput) (*ec
|
|||
}
|
||||
|
||||
// SetRepositoryPolicyRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) SetRepositoryPolicyRequest(_a0 *ecr.SetRepositoryPolicyInput) (*request.Request, *ecr.SetRepositoryPolicyOutput) {
|
||||
func (_m *MockFakeECR) SetRepositoryPolicyRequest(_a0 *ecr.SetRepositoryPolicyInput) (*request.Request, *ecr.SetRepositoryPolicyOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2034,7 +2034,7 @@ func (_m *ECRClient) SetRepositoryPolicyRequest(_a0 *ecr.SetRepositoryPolicyInpu
|
|||
}
|
||||
|
||||
// SetRepositoryPolicyWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) SetRepositoryPolicyWithContext(_a0 context.Context, _a1 *ecr.SetRepositoryPolicyInput, _a2 ...request.Option) (*ecr.SetRepositoryPolicyOutput, error) {
|
||||
func (_m *MockFakeECR) SetRepositoryPolicyWithContext(_a0 context.Context, _a1 *ecr.SetRepositoryPolicyInput, _a2 ...request.Option) (*ecr.SetRepositoryPolicyOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2064,7 +2064,7 @@ func (_m *ECRClient) SetRepositoryPolicyWithContext(_a0 context.Context, _a1 *ec
|
|||
}
|
||||
|
||||
// StartImageScan provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) StartImageScan(_a0 *ecr.StartImageScanInput) (*ecr.StartImageScanOutput, error) {
|
||||
func (_m *MockFakeECR) StartImageScan(_a0 *ecr.StartImageScanInput) (*ecr.StartImageScanOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.StartImageScanOutput
|
||||
|
@ -2087,7 +2087,7 @@ func (_m *ECRClient) StartImageScan(_a0 *ecr.StartImageScanInput) (*ecr.StartIma
|
|||
}
|
||||
|
||||
// StartImageScanRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) StartImageScanRequest(_a0 *ecr.StartImageScanInput) (*request.Request, *ecr.StartImageScanOutput) {
|
||||
func (_m *MockFakeECR) StartImageScanRequest(_a0 *ecr.StartImageScanInput) (*request.Request, *ecr.StartImageScanOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2112,7 +2112,7 @@ func (_m *ECRClient) StartImageScanRequest(_a0 *ecr.StartImageScanInput) (*reque
|
|||
}
|
||||
|
||||
// StartImageScanWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) StartImageScanWithContext(_a0 context.Context, _a1 *ecr.StartImageScanInput, _a2 ...request.Option) (*ecr.StartImageScanOutput, error) {
|
||||
func (_m *MockFakeECR) StartImageScanWithContext(_a0 context.Context, _a1 *ecr.StartImageScanInput, _a2 ...request.Option) (*ecr.StartImageScanOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2142,7 +2142,7 @@ func (_m *ECRClient) StartImageScanWithContext(_a0 context.Context, _a1 *ecr.Sta
|
|||
}
|
||||
|
||||
// StartLifecyclePolicyPreview provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) StartLifecyclePolicyPreview(_a0 *ecr.StartLifecyclePolicyPreviewInput) (*ecr.StartLifecyclePolicyPreviewOutput, error) {
|
||||
func (_m *MockFakeECR) StartLifecyclePolicyPreview(_a0 *ecr.StartLifecyclePolicyPreviewInput) (*ecr.StartLifecyclePolicyPreviewOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.StartLifecyclePolicyPreviewOutput
|
||||
|
@ -2165,7 +2165,7 @@ func (_m *ECRClient) StartLifecyclePolicyPreview(_a0 *ecr.StartLifecyclePolicyPr
|
|||
}
|
||||
|
||||
// StartLifecyclePolicyPreviewRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) StartLifecyclePolicyPreviewRequest(_a0 *ecr.StartLifecyclePolicyPreviewInput) (*request.Request, *ecr.StartLifecyclePolicyPreviewOutput) {
|
||||
func (_m *MockFakeECR) StartLifecyclePolicyPreviewRequest(_a0 *ecr.StartLifecyclePolicyPreviewInput) (*request.Request, *ecr.StartLifecyclePolicyPreviewOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2190,7 +2190,7 @@ func (_m *ECRClient) StartLifecyclePolicyPreviewRequest(_a0 *ecr.StartLifecycleP
|
|||
}
|
||||
|
||||
// StartLifecyclePolicyPreviewWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) StartLifecyclePolicyPreviewWithContext(_a0 context.Context, _a1 *ecr.StartLifecyclePolicyPreviewInput, _a2 ...request.Option) (*ecr.StartLifecyclePolicyPreviewOutput, error) {
|
||||
func (_m *MockFakeECR) StartLifecyclePolicyPreviewWithContext(_a0 context.Context, _a1 *ecr.StartLifecyclePolicyPreviewInput, _a2 ...request.Option) (*ecr.StartLifecyclePolicyPreviewOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2220,7 +2220,7 @@ func (_m *ECRClient) StartLifecyclePolicyPreviewWithContext(_a0 context.Context,
|
|||
}
|
||||
|
||||
// TagResource provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) TagResource(_a0 *ecr.TagResourceInput) (*ecr.TagResourceOutput, error) {
|
||||
func (_m *MockFakeECR) TagResource(_a0 *ecr.TagResourceInput) (*ecr.TagResourceOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.TagResourceOutput
|
||||
|
@ -2243,7 +2243,7 @@ func (_m *ECRClient) TagResource(_a0 *ecr.TagResourceInput) (*ecr.TagResourceOut
|
|||
}
|
||||
|
||||
// TagResourceRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) TagResourceRequest(_a0 *ecr.TagResourceInput) (*request.Request, *ecr.TagResourceOutput) {
|
||||
func (_m *MockFakeECR) TagResourceRequest(_a0 *ecr.TagResourceInput) (*request.Request, *ecr.TagResourceOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2268,7 +2268,7 @@ func (_m *ECRClient) TagResourceRequest(_a0 *ecr.TagResourceInput) (*request.Req
|
|||
}
|
||||
|
||||
// TagResourceWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) TagResourceWithContext(_a0 context.Context, _a1 *ecr.TagResourceInput, _a2 ...request.Option) (*ecr.TagResourceOutput, error) {
|
||||
func (_m *MockFakeECR) TagResourceWithContext(_a0 context.Context, _a1 *ecr.TagResourceInput, _a2 ...request.Option) (*ecr.TagResourceOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2298,7 +2298,7 @@ func (_m *ECRClient) TagResourceWithContext(_a0 context.Context, _a1 *ecr.TagRes
|
|||
}
|
||||
|
||||
// UntagResource provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) UntagResource(_a0 *ecr.UntagResourceInput) (*ecr.UntagResourceOutput, error) {
|
||||
func (_m *MockFakeECR) UntagResource(_a0 *ecr.UntagResourceInput) (*ecr.UntagResourceOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.UntagResourceOutput
|
||||
|
@ -2321,7 +2321,7 @@ func (_m *ECRClient) UntagResource(_a0 *ecr.UntagResourceInput) (*ecr.UntagResou
|
|||
}
|
||||
|
||||
// UntagResourceRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) UntagResourceRequest(_a0 *ecr.UntagResourceInput) (*request.Request, *ecr.UntagResourceOutput) {
|
||||
func (_m *MockFakeECR) UntagResourceRequest(_a0 *ecr.UntagResourceInput) (*request.Request, *ecr.UntagResourceOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2346,7 +2346,7 @@ func (_m *ECRClient) UntagResourceRequest(_a0 *ecr.UntagResourceInput) (*request
|
|||
}
|
||||
|
||||
// UntagResourceWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) UntagResourceWithContext(_a0 context.Context, _a1 *ecr.UntagResourceInput, _a2 ...request.Option) (*ecr.UntagResourceOutput, error) {
|
||||
func (_m *MockFakeECR) UntagResourceWithContext(_a0 context.Context, _a1 *ecr.UntagResourceInput, _a2 ...request.Option) (*ecr.UntagResourceOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2376,7 +2376,7 @@ func (_m *ECRClient) UntagResourceWithContext(_a0 context.Context, _a1 *ecr.Unta
|
|||
}
|
||||
|
||||
// UploadLayerPart provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) UploadLayerPart(_a0 *ecr.UploadLayerPartInput) (*ecr.UploadLayerPartOutput, error) {
|
||||
func (_m *MockFakeECR) UploadLayerPart(_a0 *ecr.UploadLayerPartInput) (*ecr.UploadLayerPartOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *ecr.UploadLayerPartOutput
|
||||
|
@ -2399,7 +2399,7 @@ func (_m *ECRClient) UploadLayerPart(_a0 *ecr.UploadLayerPartInput) (*ecr.Upload
|
|||
}
|
||||
|
||||
// UploadLayerPartRequest provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) UploadLayerPartRequest(_a0 *ecr.UploadLayerPartInput) (*request.Request, *ecr.UploadLayerPartOutput) {
|
||||
func (_m *MockFakeECR) UploadLayerPartRequest(_a0 *ecr.UploadLayerPartInput) (*request.Request, *ecr.UploadLayerPartOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2424,7 +2424,7 @@ func (_m *ECRClient) UploadLayerPartRequest(_a0 *ecr.UploadLayerPartInput) (*req
|
|||
}
|
||||
|
||||
// UploadLayerPartWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) UploadLayerPartWithContext(_a0 context.Context, _a1 *ecr.UploadLayerPartInput, _a2 ...request.Option) (*ecr.UploadLayerPartOutput, error) {
|
||||
func (_m *MockFakeECR) UploadLayerPartWithContext(_a0 context.Context, _a1 *ecr.UploadLayerPartInput, _a2 ...request.Option) (*ecr.UploadLayerPartOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2454,7 +2454,7 @@ func (_m *ECRClient) UploadLayerPartWithContext(_a0 context.Context, _a1 *ecr.Up
|
|||
}
|
||||
|
||||
// WaitUntilImageScanComplete provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) WaitUntilImageScanComplete(_a0 *ecr.DescribeImageScanFindingsInput) error {
|
||||
func (_m *MockFakeECR) WaitUntilImageScanComplete(_a0 *ecr.DescribeImageScanFindingsInput) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 error
|
||||
|
@ -2468,7 +2468,7 @@ func (_m *ECRClient) WaitUntilImageScanComplete(_a0 *ecr.DescribeImageScanFindin
|
|||
}
|
||||
|
||||
// WaitUntilImageScanCompleteWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) WaitUntilImageScanCompleteWithContext(_a0 context.Context, _a1 *ecr.DescribeImageScanFindingsInput, _a2 ...request.WaiterOption) error {
|
||||
func (_m *MockFakeECR) WaitUntilImageScanCompleteWithContext(_a0 context.Context, _a1 *ecr.DescribeImageScanFindingsInput, _a2 ...request.WaiterOption) error {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2489,7 +2489,7 @@ func (_m *ECRClient) WaitUntilImageScanCompleteWithContext(_a0 context.Context,
|
|||
}
|
||||
|
||||
// WaitUntilLifecyclePolicyPreviewComplete provides a mock function with given fields: _a0
|
||||
func (_m *ECRClient) WaitUntilLifecyclePolicyPreviewComplete(_a0 *ecr.GetLifecyclePolicyPreviewInput) error {
|
||||
func (_m *MockFakeECR) WaitUntilLifecyclePolicyPreviewComplete(_a0 *ecr.GetLifecyclePolicyPreviewInput) error {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 error
|
||||
|
@ -2503,7 +2503,7 @@ func (_m *ECRClient) WaitUntilLifecyclePolicyPreviewComplete(_a0 *ecr.GetLifecyc
|
|||
}
|
||||
|
||||
// WaitUntilLifecyclePolicyPreviewCompleteWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *ECRClient) WaitUntilLifecyclePolicyPreviewCompleteWithContext(_a0 context.Context, _a1 *ecr.GetLifecyclePolicyPreviewInput, _a2 ...request.WaiterOption) error {
|
||||
func (_m *MockFakeECR) WaitUntilLifecyclePolicyPreviewCompleteWithContext(_a0 context.Context, _a1 *ecr.GetLifecyclePolicyPreviewInput, _a2 ...request.WaiterOption) error {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,16 +1,16 @@
|
|||
// Code generated by mockery v2.3.0. DO NOT EDIT.
|
||||
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
package aws
|
||||
|
||||
import mock "github.com/stretchr/testify/mock"
|
||||
|
||||
// FakeRequestFailure is an autogenerated mock type for the FakeRequestFailure type
|
||||
type FakeRequestFailure struct {
|
||||
// MockFakeRequestFailure is an autogenerated mock type for the FakeRequestFailure type
|
||||
type MockFakeRequestFailure struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Code provides a mock function with given fields:
|
||||
func (_m *FakeRequestFailure) Code() string {
|
||||
func (_m *MockFakeRequestFailure) Code() string {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 string
|
||||
|
@ -24,7 +24,7 @@ func (_m *FakeRequestFailure) Code() string {
|
|||
}
|
||||
|
||||
// Error provides a mock function with given fields:
|
||||
func (_m *FakeRequestFailure) Error() string {
|
||||
func (_m *MockFakeRequestFailure) Error() string {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 string
|
||||
|
@ -38,7 +38,7 @@ func (_m *FakeRequestFailure) Error() string {
|
|||
}
|
||||
|
||||
// HostID provides a mock function with given fields:
|
||||
func (_m *FakeRequestFailure) HostID() string {
|
||||
func (_m *MockFakeRequestFailure) HostID() string {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 string
|
||||
|
@ -52,7 +52,7 @@ func (_m *FakeRequestFailure) HostID() string {
|
|||
}
|
||||
|
||||
// Message provides a mock function with given fields:
|
||||
func (_m *FakeRequestFailure) Message() string {
|
||||
func (_m *MockFakeRequestFailure) Message() string {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 string
|
||||
|
@ -66,7 +66,7 @@ func (_m *FakeRequestFailure) Message() string {
|
|||
}
|
||||
|
||||
// OrigErr provides a mock function with given fields:
|
||||
func (_m *FakeRequestFailure) OrigErr() error {
|
||||
func (_m *MockFakeRequestFailure) OrigErr() error {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 error
|
||||
|
@ -80,7 +80,7 @@ func (_m *FakeRequestFailure) OrigErr() error {
|
|||
}
|
||||
|
||||
// RequestID provides a mock function with given fields:
|
||||
func (_m *FakeRequestFailure) RequestID() string {
|
||||
func (_m *MockFakeRequestFailure) RequestID() string {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 string
|
||||
|
@ -94,7 +94,7 @@ func (_m *FakeRequestFailure) RequestID() string {
|
|||
}
|
||||
|
||||
// StatusCode provides a mock function with given fields:
|
||||
func (_m *FakeRequestFailure) StatusCode() int {
|
||||
func (_m *MockFakeRequestFailure) StatusCode() int {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 int
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
||||
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
package aws
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
@ -11,13 +11,13 @@ import (
|
|||
sns "github.com/aws/aws-sdk-go/service/sns"
|
||||
)
|
||||
|
||||
// SNSClient is an autogenerated mock type for the SNSClient type
|
||||
type SNSClient struct {
|
||||
// MockFakeSNS is an autogenerated mock type for the FakeSNS type
|
||||
type MockFakeSNS struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// AddPermission provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) AddPermission(_a0 *sns.AddPermissionInput) (*sns.AddPermissionOutput, error) {
|
||||
func (_m *MockFakeSNS) AddPermission(_a0 *sns.AddPermissionInput) (*sns.AddPermissionOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.AddPermissionOutput
|
||||
|
@ -40,7 +40,7 @@ func (_m *SNSClient) AddPermission(_a0 *sns.AddPermissionInput) (*sns.AddPermiss
|
|||
}
|
||||
|
||||
// AddPermissionRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) AddPermissionRequest(_a0 *sns.AddPermissionInput) (*request.Request, *sns.AddPermissionOutput) {
|
||||
func (_m *MockFakeSNS) AddPermissionRequest(_a0 *sns.AddPermissionInput) (*request.Request, *sns.AddPermissionOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -65,7 +65,7 @@ func (_m *SNSClient) AddPermissionRequest(_a0 *sns.AddPermissionInput) (*request
|
|||
}
|
||||
|
||||
// AddPermissionWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) AddPermissionWithContext(_a0 context.Context, _a1 *sns.AddPermissionInput, _a2 ...request.Option) (*sns.AddPermissionOutput, error) {
|
||||
func (_m *MockFakeSNS) AddPermissionWithContext(_a0 context.Context, _a1 *sns.AddPermissionInput, _a2 ...request.Option) (*sns.AddPermissionOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -95,7 +95,7 @@ func (_m *SNSClient) AddPermissionWithContext(_a0 context.Context, _a1 *sns.AddP
|
|||
}
|
||||
|
||||
// CheckIfPhoneNumberIsOptedOut provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) CheckIfPhoneNumberIsOptedOut(_a0 *sns.CheckIfPhoneNumberIsOptedOutInput) (*sns.CheckIfPhoneNumberIsOptedOutOutput, error) {
|
||||
func (_m *MockFakeSNS) CheckIfPhoneNumberIsOptedOut(_a0 *sns.CheckIfPhoneNumberIsOptedOutInput) (*sns.CheckIfPhoneNumberIsOptedOutOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.CheckIfPhoneNumberIsOptedOutOutput
|
||||
|
@ -118,7 +118,7 @@ func (_m *SNSClient) CheckIfPhoneNumberIsOptedOut(_a0 *sns.CheckIfPhoneNumberIsO
|
|||
}
|
||||
|
||||
// CheckIfPhoneNumberIsOptedOutRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) CheckIfPhoneNumberIsOptedOutRequest(_a0 *sns.CheckIfPhoneNumberIsOptedOutInput) (*request.Request, *sns.CheckIfPhoneNumberIsOptedOutOutput) {
|
||||
func (_m *MockFakeSNS) CheckIfPhoneNumberIsOptedOutRequest(_a0 *sns.CheckIfPhoneNumberIsOptedOutInput) (*request.Request, *sns.CheckIfPhoneNumberIsOptedOutOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -143,7 +143,7 @@ func (_m *SNSClient) CheckIfPhoneNumberIsOptedOutRequest(_a0 *sns.CheckIfPhoneNu
|
|||
}
|
||||
|
||||
// CheckIfPhoneNumberIsOptedOutWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) CheckIfPhoneNumberIsOptedOutWithContext(_a0 context.Context, _a1 *sns.CheckIfPhoneNumberIsOptedOutInput, _a2 ...request.Option) (*sns.CheckIfPhoneNumberIsOptedOutOutput, error) {
|
||||
func (_m *MockFakeSNS) CheckIfPhoneNumberIsOptedOutWithContext(_a0 context.Context, _a1 *sns.CheckIfPhoneNumberIsOptedOutInput, _a2 ...request.Option) (*sns.CheckIfPhoneNumberIsOptedOutOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -173,7 +173,7 @@ func (_m *SNSClient) CheckIfPhoneNumberIsOptedOutWithContext(_a0 context.Context
|
|||
}
|
||||
|
||||
// ConfirmSubscription provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ConfirmSubscription(_a0 *sns.ConfirmSubscriptionInput) (*sns.ConfirmSubscriptionOutput, error) {
|
||||
func (_m *MockFakeSNS) ConfirmSubscription(_a0 *sns.ConfirmSubscriptionInput) (*sns.ConfirmSubscriptionOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.ConfirmSubscriptionOutput
|
||||
|
@ -196,7 +196,7 @@ func (_m *SNSClient) ConfirmSubscription(_a0 *sns.ConfirmSubscriptionInput) (*sn
|
|||
}
|
||||
|
||||
// ConfirmSubscriptionRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ConfirmSubscriptionRequest(_a0 *sns.ConfirmSubscriptionInput) (*request.Request, *sns.ConfirmSubscriptionOutput) {
|
||||
func (_m *MockFakeSNS) ConfirmSubscriptionRequest(_a0 *sns.ConfirmSubscriptionInput) (*request.Request, *sns.ConfirmSubscriptionOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -221,7 +221,7 @@ func (_m *SNSClient) ConfirmSubscriptionRequest(_a0 *sns.ConfirmSubscriptionInpu
|
|||
}
|
||||
|
||||
// ConfirmSubscriptionWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) ConfirmSubscriptionWithContext(_a0 context.Context, _a1 *sns.ConfirmSubscriptionInput, _a2 ...request.Option) (*sns.ConfirmSubscriptionOutput, error) {
|
||||
func (_m *MockFakeSNS) ConfirmSubscriptionWithContext(_a0 context.Context, _a1 *sns.ConfirmSubscriptionInput, _a2 ...request.Option) (*sns.ConfirmSubscriptionOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -251,7 +251,7 @@ func (_m *SNSClient) ConfirmSubscriptionWithContext(_a0 context.Context, _a1 *sn
|
|||
}
|
||||
|
||||
// CreatePlatformApplication provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) CreatePlatformApplication(_a0 *sns.CreatePlatformApplicationInput) (*sns.CreatePlatformApplicationOutput, error) {
|
||||
func (_m *MockFakeSNS) CreatePlatformApplication(_a0 *sns.CreatePlatformApplicationInput) (*sns.CreatePlatformApplicationOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.CreatePlatformApplicationOutput
|
||||
|
@ -274,7 +274,7 @@ func (_m *SNSClient) CreatePlatformApplication(_a0 *sns.CreatePlatformApplicatio
|
|||
}
|
||||
|
||||
// CreatePlatformApplicationRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) CreatePlatformApplicationRequest(_a0 *sns.CreatePlatformApplicationInput) (*request.Request, *sns.CreatePlatformApplicationOutput) {
|
||||
func (_m *MockFakeSNS) CreatePlatformApplicationRequest(_a0 *sns.CreatePlatformApplicationInput) (*request.Request, *sns.CreatePlatformApplicationOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -299,7 +299,7 @@ func (_m *SNSClient) CreatePlatformApplicationRequest(_a0 *sns.CreatePlatformApp
|
|||
}
|
||||
|
||||
// CreatePlatformApplicationWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) CreatePlatformApplicationWithContext(_a0 context.Context, _a1 *sns.CreatePlatformApplicationInput, _a2 ...request.Option) (*sns.CreatePlatformApplicationOutput, error) {
|
||||
func (_m *MockFakeSNS) CreatePlatformApplicationWithContext(_a0 context.Context, _a1 *sns.CreatePlatformApplicationInput, _a2 ...request.Option) (*sns.CreatePlatformApplicationOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -329,7 +329,7 @@ func (_m *SNSClient) CreatePlatformApplicationWithContext(_a0 context.Context, _
|
|||
}
|
||||
|
||||
// CreatePlatformEndpoint provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) CreatePlatformEndpoint(_a0 *sns.CreatePlatformEndpointInput) (*sns.CreatePlatformEndpointOutput, error) {
|
||||
func (_m *MockFakeSNS) CreatePlatformEndpoint(_a0 *sns.CreatePlatformEndpointInput) (*sns.CreatePlatformEndpointOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.CreatePlatformEndpointOutput
|
||||
|
@ -352,7 +352,7 @@ func (_m *SNSClient) CreatePlatformEndpoint(_a0 *sns.CreatePlatformEndpointInput
|
|||
}
|
||||
|
||||
// CreatePlatformEndpointRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) CreatePlatformEndpointRequest(_a0 *sns.CreatePlatformEndpointInput) (*request.Request, *sns.CreatePlatformEndpointOutput) {
|
||||
func (_m *MockFakeSNS) CreatePlatformEndpointRequest(_a0 *sns.CreatePlatformEndpointInput) (*request.Request, *sns.CreatePlatformEndpointOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -377,7 +377,7 @@ func (_m *SNSClient) CreatePlatformEndpointRequest(_a0 *sns.CreatePlatformEndpoi
|
|||
}
|
||||
|
||||
// CreatePlatformEndpointWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) CreatePlatformEndpointWithContext(_a0 context.Context, _a1 *sns.CreatePlatformEndpointInput, _a2 ...request.Option) (*sns.CreatePlatformEndpointOutput, error) {
|
||||
func (_m *MockFakeSNS) CreatePlatformEndpointWithContext(_a0 context.Context, _a1 *sns.CreatePlatformEndpointInput, _a2 ...request.Option) (*sns.CreatePlatformEndpointOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -407,7 +407,7 @@ func (_m *SNSClient) CreatePlatformEndpointWithContext(_a0 context.Context, _a1
|
|||
}
|
||||
|
||||
// CreateTopic provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) CreateTopic(_a0 *sns.CreateTopicInput) (*sns.CreateTopicOutput, error) {
|
||||
func (_m *MockFakeSNS) CreateTopic(_a0 *sns.CreateTopicInput) (*sns.CreateTopicOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.CreateTopicOutput
|
||||
|
@ -430,7 +430,7 @@ func (_m *SNSClient) CreateTopic(_a0 *sns.CreateTopicInput) (*sns.CreateTopicOut
|
|||
}
|
||||
|
||||
// CreateTopicRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) CreateTopicRequest(_a0 *sns.CreateTopicInput) (*request.Request, *sns.CreateTopicOutput) {
|
||||
func (_m *MockFakeSNS) CreateTopicRequest(_a0 *sns.CreateTopicInput) (*request.Request, *sns.CreateTopicOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -455,7 +455,7 @@ func (_m *SNSClient) CreateTopicRequest(_a0 *sns.CreateTopicInput) (*request.Req
|
|||
}
|
||||
|
||||
// CreateTopicWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) CreateTopicWithContext(_a0 context.Context, _a1 *sns.CreateTopicInput, _a2 ...request.Option) (*sns.CreateTopicOutput, error) {
|
||||
func (_m *MockFakeSNS) CreateTopicWithContext(_a0 context.Context, _a1 *sns.CreateTopicInput, _a2 ...request.Option) (*sns.CreateTopicOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -485,7 +485,7 @@ func (_m *SNSClient) CreateTopicWithContext(_a0 context.Context, _a1 *sns.Create
|
|||
}
|
||||
|
||||
// DeleteEndpoint provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) DeleteEndpoint(_a0 *sns.DeleteEndpointInput) (*sns.DeleteEndpointOutput, error) {
|
||||
func (_m *MockFakeSNS) DeleteEndpoint(_a0 *sns.DeleteEndpointInput) (*sns.DeleteEndpointOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.DeleteEndpointOutput
|
||||
|
@ -508,7 +508,7 @@ func (_m *SNSClient) DeleteEndpoint(_a0 *sns.DeleteEndpointInput) (*sns.DeleteEn
|
|||
}
|
||||
|
||||
// DeleteEndpointRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) DeleteEndpointRequest(_a0 *sns.DeleteEndpointInput) (*request.Request, *sns.DeleteEndpointOutput) {
|
||||
func (_m *MockFakeSNS) DeleteEndpointRequest(_a0 *sns.DeleteEndpointInput) (*request.Request, *sns.DeleteEndpointOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -533,7 +533,7 @@ func (_m *SNSClient) DeleteEndpointRequest(_a0 *sns.DeleteEndpointInput) (*reque
|
|||
}
|
||||
|
||||
// DeleteEndpointWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) DeleteEndpointWithContext(_a0 context.Context, _a1 *sns.DeleteEndpointInput, _a2 ...request.Option) (*sns.DeleteEndpointOutput, error) {
|
||||
func (_m *MockFakeSNS) DeleteEndpointWithContext(_a0 context.Context, _a1 *sns.DeleteEndpointInput, _a2 ...request.Option) (*sns.DeleteEndpointOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -563,7 +563,7 @@ func (_m *SNSClient) DeleteEndpointWithContext(_a0 context.Context, _a1 *sns.Del
|
|||
}
|
||||
|
||||
// DeletePlatformApplication provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) DeletePlatformApplication(_a0 *sns.DeletePlatformApplicationInput) (*sns.DeletePlatformApplicationOutput, error) {
|
||||
func (_m *MockFakeSNS) DeletePlatformApplication(_a0 *sns.DeletePlatformApplicationInput) (*sns.DeletePlatformApplicationOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.DeletePlatformApplicationOutput
|
||||
|
@ -586,7 +586,7 @@ func (_m *SNSClient) DeletePlatformApplication(_a0 *sns.DeletePlatformApplicatio
|
|||
}
|
||||
|
||||
// DeletePlatformApplicationRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) DeletePlatformApplicationRequest(_a0 *sns.DeletePlatformApplicationInput) (*request.Request, *sns.DeletePlatformApplicationOutput) {
|
||||
func (_m *MockFakeSNS) DeletePlatformApplicationRequest(_a0 *sns.DeletePlatformApplicationInput) (*request.Request, *sns.DeletePlatformApplicationOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -611,7 +611,7 @@ func (_m *SNSClient) DeletePlatformApplicationRequest(_a0 *sns.DeletePlatformApp
|
|||
}
|
||||
|
||||
// DeletePlatformApplicationWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) DeletePlatformApplicationWithContext(_a0 context.Context, _a1 *sns.DeletePlatformApplicationInput, _a2 ...request.Option) (*sns.DeletePlatformApplicationOutput, error) {
|
||||
func (_m *MockFakeSNS) DeletePlatformApplicationWithContext(_a0 context.Context, _a1 *sns.DeletePlatformApplicationInput, _a2 ...request.Option) (*sns.DeletePlatformApplicationOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -641,7 +641,7 @@ func (_m *SNSClient) DeletePlatformApplicationWithContext(_a0 context.Context, _
|
|||
}
|
||||
|
||||
// DeleteTopic provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) DeleteTopic(_a0 *sns.DeleteTopicInput) (*sns.DeleteTopicOutput, error) {
|
||||
func (_m *MockFakeSNS) DeleteTopic(_a0 *sns.DeleteTopicInput) (*sns.DeleteTopicOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.DeleteTopicOutput
|
||||
|
@ -664,7 +664,7 @@ func (_m *SNSClient) DeleteTopic(_a0 *sns.DeleteTopicInput) (*sns.DeleteTopicOut
|
|||
}
|
||||
|
||||
// DeleteTopicRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) DeleteTopicRequest(_a0 *sns.DeleteTopicInput) (*request.Request, *sns.DeleteTopicOutput) {
|
||||
func (_m *MockFakeSNS) DeleteTopicRequest(_a0 *sns.DeleteTopicInput) (*request.Request, *sns.DeleteTopicOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -689,7 +689,7 @@ func (_m *SNSClient) DeleteTopicRequest(_a0 *sns.DeleteTopicInput) (*request.Req
|
|||
}
|
||||
|
||||
// DeleteTopicWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) DeleteTopicWithContext(_a0 context.Context, _a1 *sns.DeleteTopicInput, _a2 ...request.Option) (*sns.DeleteTopicOutput, error) {
|
||||
func (_m *MockFakeSNS) DeleteTopicWithContext(_a0 context.Context, _a1 *sns.DeleteTopicInput, _a2 ...request.Option) (*sns.DeleteTopicOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -719,7 +719,7 @@ func (_m *SNSClient) DeleteTopicWithContext(_a0 context.Context, _a1 *sns.Delete
|
|||
}
|
||||
|
||||
// GetEndpointAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetEndpointAttributes(_a0 *sns.GetEndpointAttributesInput) (*sns.GetEndpointAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetEndpointAttributes(_a0 *sns.GetEndpointAttributesInput) (*sns.GetEndpointAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.GetEndpointAttributesOutput
|
||||
|
@ -742,7 +742,7 @@ func (_m *SNSClient) GetEndpointAttributes(_a0 *sns.GetEndpointAttributesInput)
|
|||
}
|
||||
|
||||
// GetEndpointAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetEndpointAttributesRequest(_a0 *sns.GetEndpointAttributesInput) (*request.Request, *sns.GetEndpointAttributesOutput) {
|
||||
func (_m *MockFakeSNS) GetEndpointAttributesRequest(_a0 *sns.GetEndpointAttributesInput) (*request.Request, *sns.GetEndpointAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -767,7 +767,7 @@ func (_m *SNSClient) GetEndpointAttributesRequest(_a0 *sns.GetEndpointAttributes
|
|||
}
|
||||
|
||||
// GetEndpointAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) GetEndpointAttributesWithContext(_a0 context.Context, _a1 *sns.GetEndpointAttributesInput, _a2 ...request.Option) (*sns.GetEndpointAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetEndpointAttributesWithContext(_a0 context.Context, _a1 *sns.GetEndpointAttributesInput, _a2 ...request.Option) (*sns.GetEndpointAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -797,7 +797,7 @@ func (_m *SNSClient) GetEndpointAttributesWithContext(_a0 context.Context, _a1 *
|
|||
}
|
||||
|
||||
// GetPlatformApplicationAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetPlatformApplicationAttributes(_a0 *sns.GetPlatformApplicationAttributesInput) (*sns.GetPlatformApplicationAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetPlatformApplicationAttributes(_a0 *sns.GetPlatformApplicationAttributesInput) (*sns.GetPlatformApplicationAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.GetPlatformApplicationAttributesOutput
|
||||
|
@ -820,7 +820,7 @@ func (_m *SNSClient) GetPlatformApplicationAttributes(_a0 *sns.GetPlatformApplic
|
|||
}
|
||||
|
||||
// GetPlatformApplicationAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetPlatformApplicationAttributesRequest(_a0 *sns.GetPlatformApplicationAttributesInput) (*request.Request, *sns.GetPlatformApplicationAttributesOutput) {
|
||||
func (_m *MockFakeSNS) GetPlatformApplicationAttributesRequest(_a0 *sns.GetPlatformApplicationAttributesInput) (*request.Request, *sns.GetPlatformApplicationAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -845,7 +845,7 @@ func (_m *SNSClient) GetPlatformApplicationAttributesRequest(_a0 *sns.GetPlatfor
|
|||
}
|
||||
|
||||
// GetPlatformApplicationAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) GetPlatformApplicationAttributesWithContext(_a0 context.Context, _a1 *sns.GetPlatformApplicationAttributesInput, _a2 ...request.Option) (*sns.GetPlatformApplicationAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetPlatformApplicationAttributesWithContext(_a0 context.Context, _a1 *sns.GetPlatformApplicationAttributesInput, _a2 ...request.Option) (*sns.GetPlatformApplicationAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -875,7 +875,7 @@ func (_m *SNSClient) GetPlatformApplicationAttributesWithContext(_a0 context.Con
|
|||
}
|
||||
|
||||
// GetSMSAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetSMSAttributes(_a0 *sns.GetSMSAttributesInput) (*sns.GetSMSAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetSMSAttributes(_a0 *sns.GetSMSAttributesInput) (*sns.GetSMSAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.GetSMSAttributesOutput
|
||||
|
@ -898,7 +898,7 @@ func (_m *SNSClient) GetSMSAttributes(_a0 *sns.GetSMSAttributesInput) (*sns.GetS
|
|||
}
|
||||
|
||||
// GetSMSAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetSMSAttributesRequest(_a0 *sns.GetSMSAttributesInput) (*request.Request, *sns.GetSMSAttributesOutput) {
|
||||
func (_m *MockFakeSNS) GetSMSAttributesRequest(_a0 *sns.GetSMSAttributesInput) (*request.Request, *sns.GetSMSAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -923,7 +923,7 @@ func (_m *SNSClient) GetSMSAttributesRequest(_a0 *sns.GetSMSAttributesInput) (*r
|
|||
}
|
||||
|
||||
// GetSMSAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) GetSMSAttributesWithContext(_a0 context.Context, _a1 *sns.GetSMSAttributesInput, _a2 ...request.Option) (*sns.GetSMSAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetSMSAttributesWithContext(_a0 context.Context, _a1 *sns.GetSMSAttributesInput, _a2 ...request.Option) (*sns.GetSMSAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -953,7 +953,7 @@ func (_m *SNSClient) GetSMSAttributesWithContext(_a0 context.Context, _a1 *sns.G
|
|||
}
|
||||
|
||||
// GetSubscriptionAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetSubscriptionAttributes(_a0 *sns.GetSubscriptionAttributesInput) (*sns.GetSubscriptionAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetSubscriptionAttributes(_a0 *sns.GetSubscriptionAttributesInput) (*sns.GetSubscriptionAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.GetSubscriptionAttributesOutput
|
||||
|
@ -976,7 +976,7 @@ func (_m *SNSClient) GetSubscriptionAttributes(_a0 *sns.GetSubscriptionAttribute
|
|||
}
|
||||
|
||||
// GetSubscriptionAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetSubscriptionAttributesRequest(_a0 *sns.GetSubscriptionAttributesInput) (*request.Request, *sns.GetSubscriptionAttributesOutput) {
|
||||
func (_m *MockFakeSNS) GetSubscriptionAttributesRequest(_a0 *sns.GetSubscriptionAttributesInput) (*request.Request, *sns.GetSubscriptionAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1001,7 +1001,7 @@ func (_m *SNSClient) GetSubscriptionAttributesRequest(_a0 *sns.GetSubscriptionAt
|
|||
}
|
||||
|
||||
// GetSubscriptionAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) GetSubscriptionAttributesWithContext(_a0 context.Context, _a1 *sns.GetSubscriptionAttributesInput, _a2 ...request.Option) (*sns.GetSubscriptionAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetSubscriptionAttributesWithContext(_a0 context.Context, _a1 *sns.GetSubscriptionAttributesInput, _a2 ...request.Option) (*sns.GetSubscriptionAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1031,7 +1031,7 @@ func (_m *SNSClient) GetSubscriptionAttributesWithContext(_a0 context.Context, _
|
|||
}
|
||||
|
||||
// GetTopicAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetTopicAttributes(_a0 *sns.GetTopicAttributesInput) (*sns.GetTopicAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetTopicAttributes(_a0 *sns.GetTopicAttributesInput) (*sns.GetTopicAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.GetTopicAttributesOutput
|
||||
|
@ -1054,7 +1054,7 @@ func (_m *SNSClient) GetTopicAttributes(_a0 *sns.GetTopicAttributesInput) (*sns.
|
|||
}
|
||||
|
||||
// GetTopicAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) GetTopicAttributesRequest(_a0 *sns.GetTopicAttributesInput) (*request.Request, *sns.GetTopicAttributesOutput) {
|
||||
func (_m *MockFakeSNS) GetTopicAttributesRequest(_a0 *sns.GetTopicAttributesInput) (*request.Request, *sns.GetTopicAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1079,7 +1079,7 @@ func (_m *SNSClient) GetTopicAttributesRequest(_a0 *sns.GetTopicAttributesInput)
|
|||
}
|
||||
|
||||
// GetTopicAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) GetTopicAttributesWithContext(_a0 context.Context, _a1 *sns.GetTopicAttributesInput, _a2 ...request.Option) (*sns.GetTopicAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) GetTopicAttributesWithContext(_a0 context.Context, _a1 *sns.GetTopicAttributesInput, _a2 ...request.Option) (*sns.GetTopicAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1109,7 +1109,7 @@ func (_m *SNSClient) GetTopicAttributesWithContext(_a0 context.Context, _a1 *sns
|
|||
}
|
||||
|
||||
// ListEndpointsByPlatformApplication provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListEndpointsByPlatformApplication(_a0 *sns.ListEndpointsByPlatformApplicationInput) (*sns.ListEndpointsByPlatformApplicationOutput, error) {
|
||||
func (_m *MockFakeSNS) ListEndpointsByPlatformApplication(_a0 *sns.ListEndpointsByPlatformApplicationInput) (*sns.ListEndpointsByPlatformApplicationOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.ListEndpointsByPlatformApplicationOutput
|
||||
|
@ -1132,7 +1132,7 @@ func (_m *SNSClient) ListEndpointsByPlatformApplication(_a0 *sns.ListEndpointsBy
|
|||
}
|
||||
|
||||
// ListEndpointsByPlatformApplicationPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *SNSClient) ListEndpointsByPlatformApplicationPages(_a0 *sns.ListEndpointsByPlatformApplicationInput, _a1 func(*sns.ListEndpointsByPlatformApplicationOutput, bool) bool) error {
|
||||
func (_m *MockFakeSNS) ListEndpointsByPlatformApplicationPages(_a0 *sns.ListEndpointsByPlatformApplicationInput, _a1 func(*sns.ListEndpointsByPlatformApplicationOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -1146,7 +1146,7 @@ func (_m *SNSClient) ListEndpointsByPlatformApplicationPages(_a0 *sns.ListEndpoi
|
|||
}
|
||||
|
||||
// ListEndpointsByPlatformApplicationPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *SNSClient) ListEndpointsByPlatformApplicationPagesWithContext(_a0 context.Context, _a1 *sns.ListEndpointsByPlatformApplicationInput, _a2 func(*sns.ListEndpointsByPlatformApplicationOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeSNS) ListEndpointsByPlatformApplicationPagesWithContext(_a0 context.Context, _a1 *sns.ListEndpointsByPlatformApplicationInput, _a2 func(*sns.ListEndpointsByPlatformApplicationOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -1167,7 +1167,7 @@ func (_m *SNSClient) ListEndpointsByPlatformApplicationPagesWithContext(_a0 cont
|
|||
}
|
||||
|
||||
// ListEndpointsByPlatformApplicationRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListEndpointsByPlatformApplicationRequest(_a0 *sns.ListEndpointsByPlatformApplicationInput) (*request.Request, *sns.ListEndpointsByPlatformApplicationOutput) {
|
||||
func (_m *MockFakeSNS) ListEndpointsByPlatformApplicationRequest(_a0 *sns.ListEndpointsByPlatformApplicationInput) (*request.Request, *sns.ListEndpointsByPlatformApplicationOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1192,7 +1192,7 @@ func (_m *SNSClient) ListEndpointsByPlatformApplicationRequest(_a0 *sns.ListEndp
|
|||
}
|
||||
|
||||
// ListEndpointsByPlatformApplicationWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) ListEndpointsByPlatformApplicationWithContext(_a0 context.Context, _a1 *sns.ListEndpointsByPlatformApplicationInput, _a2 ...request.Option) (*sns.ListEndpointsByPlatformApplicationOutput, error) {
|
||||
func (_m *MockFakeSNS) ListEndpointsByPlatformApplicationWithContext(_a0 context.Context, _a1 *sns.ListEndpointsByPlatformApplicationInput, _a2 ...request.Option) (*sns.ListEndpointsByPlatformApplicationOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1222,7 +1222,7 @@ func (_m *SNSClient) ListEndpointsByPlatformApplicationWithContext(_a0 context.C
|
|||
}
|
||||
|
||||
// ListPhoneNumbersOptedOut provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListPhoneNumbersOptedOut(_a0 *sns.ListPhoneNumbersOptedOutInput) (*sns.ListPhoneNumbersOptedOutOutput, error) {
|
||||
func (_m *MockFakeSNS) ListPhoneNumbersOptedOut(_a0 *sns.ListPhoneNumbersOptedOutInput) (*sns.ListPhoneNumbersOptedOutOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.ListPhoneNumbersOptedOutOutput
|
||||
|
@ -1245,7 +1245,7 @@ func (_m *SNSClient) ListPhoneNumbersOptedOut(_a0 *sns.ListPhoneNumbersOptedOutI
|
|||
}
|
||||
|
||||
// ListPhoneNumbersOptedOutRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListPhoneNumbersOptedOutRequest(_a0 *sns.ListPhoneNumbersOptedOutInput) (*request.Request, *sns.ListPhoneNumbersOptedOutOutput) {
|
||||
func (_m *MockFakeSNS) ListPhoneNumbersOptedOutRequest(_a0 *sns.ListPhoneNumbersOptedOutInput) (*request.Request, *sns.ListPhoneNumbersOptedOutOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1270,7 +1270,7 @@ func (_m *SNSClient) ListPhoneNumbersOptedOutRequest(_a0 *sns.ListPhoneNumbersOp
|
|||
}
|
||||
|
||||
// ListPhoneNumbersOptedOutWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) ListPhoneNumbersOptedOutWithContext(_a0 context.Context, _a1 *sns.ListPhoneNumbersOptedOutInput, _a2 ...request.Option) (*sns.ListPhoneNumbersOptedOutOutput, error) {
|
||||
func (_m *MockFakeSNS) ListPhoneNumbersOptedOutWithContext(_a0 context.Context, _a1 *sns.ListPhoneNumbersOptedOutInput, _a2 ...request.Option) (*sns.ListPhoneNumbersOptedOutOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1300,7 +1300,7 @@ func (_m *SNSClient) ListPhoneNumbersOptedOutWithContext(_a0 context.Context, _a
|
|||
}
|
||||
|
||||
// ListPlatformApplications provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListPlatformApplications(_a0 *sns.ListPlatformApplicationsInput) (*sns.ListPlatformApplicationsOutput, error) {
|
||||
func (_m *MockFakeSNS) ListPlatformApplications(_a0 *sns.ListPlatformApplicationsInput) (*sns.ListPlatformApplicationsOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.ListPlatformApplicationsOutput
|
||||
|
@ -1323,7 +1323,7 @@ func (_m *SNSClient) ListPlatformApplications(_a0 *sns.ListPlatformApplicationsI
|
|||
}
|
||||
|
||||
// ListPlatformApplicationsPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *SNSClient) ListPlatformApplicationsPages(_a0 *sns.ListPlatformApplicationsInput, _a1 func(*sns.ListPlatformApplicationsOutput, bool) bool) error {
|
||||
func (_m *MockFakeSNS) ListPlatformApplicationsPages(_a0 *sns.ListPlatformApplicationsInput, _a1 func(*sns.ListPlatformApplicationsOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -1337,7 +1337,7 @@ func (_m *SNSClient) ListPlatformApplicationsPages(_a0 *sns.ListPlatformApplicat
|
|||
}
|
||||
|
||||
// ListPlatformApplicationsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *SNSClient) ListPlatformApplicationsPagesWithContext(_a0 context.Context, _a1 *sns.ListPlatformApplicationsInput, _a2 func(*sns.ListPlatformApplicationsOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeSNS) ListPlatformApplicationsPagesWithContext(_a0 context.Context, _a1 *sns.ListPlatformApplicationsInput, _a2 func(*sns.ListPlatformApplicationsOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -1358,7 +1358,7 @@ func (_m *SNSClient) ListPlatformApplicationsPagesWithContext(_a0 context.Contex
|
|||
}
|
||||
|
||||
// ListPlatformApplicationsRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListPlatformApplicationsRequest(_a0 *sns.ListPlatformApplicationsInput) (*request.Request, *sns.ListPlatformApplicationsOutput) {
|
||||
func (_m *MockFakeSNS) ListPlatformApplicationsRequest(_a0 *sns.ListPlatformApplicationsInput) (*request.Request, *sns.ListPlatformApplicationsOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1383,7 +1383,7 @@ func (_m *SNSClient) ListPlatformApplicationsRequest(_a0 *sns.ListPlatformApplic
|
|||
}
|
||||
|
||||
// ListPlatformApplicationsWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) ListPlatformApplicationsWithContext(_a0 context.Context, _a1 *sns.ListPlatformApplicationsInput, _a2 ...request.Option) (*sns.ListPlatformApplicationsOutput, error) {
|
||||
func (_m *MockFakeSNS) ListPlatformApplicationsWithContext(_a0 context.Context, _a1 *sns.ListPlatformApplicationsInput, _a2 ...request.Option) (*sns.ListPlatformApplicationsOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1413,7 +1413,7 @@ func (_m *SNSClient) ListPlatformApplicationsWithContext(_a0 context.Context, _a
|
|||
}
|
||||
|
||||
// ListSubscriptions provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListSubscriptions(_a0 *sns.ListSubscriptionsInput) (*sns.ListSubscriptionsOutput, error) {
|
||||
func (_m *MockFakeSNS) ListSubscriptions(_a0 *sns.ListSubscriptionsInput) (*sns.ListSubscriptionsOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.ListSubscriptionsOutput
|
||||
|
@ -1436,7 +1436,7 @@ func (_m *SNSClient) ListSubscriptions(_a0 *sns.ListSubscriptionsInput) (*sns.Li
|
|||
}
|
||||
|
||||
// ListSubscriptionsByTopic provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListSubscriptionsByTopic(_a0 *sns.ListSubscriptionsByTopicInput) (*sns.ListSubscriptionsByTopicOutput, error) {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsByTopic(_a0 *sns.ListSubscriptionsByTopicInput) (*sns.ListSubscriptionsByTopicOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.ListSubscriptionsByTopicOutput
|
||||
|
@ -1459,7 +1459,7 @@ func (_m *SNSClient) ListSubscriptionsByTopic(_a0 *sns.ListSubscriptionsByTopicI
|
|||
}
|
||||
|
||||
// ListSubscriptionsByTopicPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *SNSClient) ListSubscriptionsByTopicPages(_a0 *sns.ListSubscriptionsByTopicInput, _a1 func(*sns.ListSubscriptionsByTopicOutput, bool) bool) error {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsByTopicPages(_a0 *sns.ListSubscriptionsByTopicInput, _a1 func(*sns.ListSubscriptionsByTopicOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -1473,7 +1473,7 @@ func (_m *SNSClient) ListSubscriptionsByTopicPages(_a0 *sns.ListSubscriptionsByT
|
|||
}
|
||||
|
||||
// ListSubscriptionsByTopicPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *SNSClient) ListSubscriptionsByTopicPagesWithContext(_a0 context.Context, _a1 *sns.ListSubscriptionsByTopicInput, _a2 func(*sns.ListSubscriptionsByTopicOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsByTopicPagesWithContext(_a0 context.Context, _a1 *sns.ListSubscriptionsByTopicInput, _a2 func(*sns.ListSubscriptionsByTopicOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -1494,7 +1494,7 @@ func (_m *SNSClient) ListSubscriptionsByTopicPagesWithContext(_a0 context.Contex
|
|||
}
|
||||
|
||||
// ListSubscriptionsByTopicRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListSubscriptionsByTopicRequest(_a0 *sns.ListSubscriptionsByTopicInput) (*request.Request, *sns.ListSubscriptionsByTopicOutput) {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsByTopicRequest(_a0 *sns.ListSubscriptionsByTopicInput) (*request.Request, *sns.ListSubscriptionsByTopicOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1519,7 +1519,7 @@ func (_m *SNSClient) ListSubscriptionsByTopicRequest(_a0 *sns.ListSubscriptionsB
|
|||
}
|
||||
|
||||
// ListSubscriptionsByTopicWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) ListSubscriptionsByTopicWithContext(_a0 context.Context, _a1 *sns.ListSubscriptionsByTopicInput, _a2 ...request.Option) (*sns.ListSubscriptionsByTopicOutput, error) {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsByTopicWithContext(_a0 context.Context, _a1 *sns.ListSubscriptionsByTopicInput, _a2 ...request.Option) (*sns.ListSubscriptionsByTopicOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1549,7 +1549,7 @@ func (_m *SNSClient) ListSubscriptionsByTopicWithContext(_a0 context.Context, _a
|
|||
}
|
||||
|
||||
// ListSubscriptionsPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *SNSClient) ListSubscriptionsPages(_a0 *sns.ListSubscriptionsInput, _a1 func(*sns.ListSubscriptionsOutput, bool) bool) error {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsPages(_a0 *sns.ListSubscriptionsInput, _a1 func(*sns.ListSubscriptionsOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -1563,7 +1563,7 @@ func (_m *SNSClient) ListSubscriptionsPages(_a0 *sns.ListSubscriptionsInput, _a1
|
|||
}
|
||||
|
||||
// ListSubscriptionsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *SNSClient) ListSubscriptionsPagesWithContext(_a0 context.Context, _a1 *sns.ListSubscriptionsInput, _a2 func(*sns.ListSubscriptionsOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsPagesWithContext(_a0 context.Context, _a1 *sns.ListSubscriptionsInput, _a2 func(*sns.ListSubscriptionsOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -1584,7 +1584,7 @@ func (_m *SNSClient) ListSubscriptionsPagesWithContext(_a0 context.Context, _a1
|
|||
}
|
||||
|
||||
// ListSubscriptionsRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListSubscriptionsRequest(_a0 *sns.ListSubscriptionsInput) (*request.Request, *sns.ListSubscriptionsOutput) {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsRequest(_a0 *sns.ListSubscriptionsInput) (*request.Request, *sns.ListSubscriptionsOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1609,7 +1609,7 @@ func (_m *SNSClient) ListSubscriptionsRequest(_a0 *sns.ListSubscriptionsInput) (
|
|||
}
|
||||
|
||||
// ListSubscriptionsWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) ListSubscriptionsWithContext(_a0 context.Context, _a1 *sns.ListSubscriptionsInput, _a2 ...request.Option) (*sns.ListSubscriptionsOutput, error) {
|
||||
func (_m *MockFakeSNS) ListSubscriptionsWithContext(_a0 context.Context, _a1 *sns.ListSubscriptionsInput, _a2 ...request.Option) (*sns.ListSubscriptionsOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1639,7 +1639,7 @@ func (_m *SNSClient) ListSubscriptionsWithContext(_a0 context.Context, _a1 *sns.
|
|||
}
|
||||
|
||||
// ListTagsForResource provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListTagsForResource(_a0 *sns.ListTagsForResourceInput) (*sns.ListTagsForResourceOutput, error) {
|
||||
func (_m *MockFakeSNS) ListTagsForResource(_a0 *sns.ListTagsForResourceInput) (*sns.ListTagsForResourceOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.ListTagsForResourceOutput
|
||||
|
@ -1662,7 +1662,7 @@ func (_m *SNSClient) ListTagsForResource(_a0 *sns.ListTagsForResourceInput) (*sn
|
|||
}
|
||||
|
||||
// ListTagsForResourceRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListTagsForResourceRequest(_a0 *sns.ListTagsForResourceInput) (*request.Request, *sns.ListTagsForResourceOutput) {
|
||||
func (_m *MockFakeSNS) ListTagsForResourceRequest(_a0 *sns.ListTagsForResourceInput) (*request.Request, *sns.ListTagsForResourceOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1687,7 +1687,7 @@ func (_m *SNSClient) ListTagsForResourceRequest(_a0 *sns.ListTagsForResourceInpu
|
|||
}
|
||||
|
||||
// ListTagsForResourceWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) ListTagsForResourceWithContext(_a0 context.Context, _a1 *sns.ListTagsForResourceInput, _a2 ...request.Option) (*sns.ListTagsForResourceOutput, error) {
|
||||
func (_m *MockFakeSNS) ListTagsForResourceWithContext(_a0 context.Context, _a1 *sns.ListTagsForResourceInput, _a2 ...request.Option) (*sns.ListTagsForResourceOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1717,7 +1717,7 @@ func (_m *SNSClient) ListTagsForResourceWithContext(_a0 context.Context, _a1 *sn
|
|||
}
|
||||
|
||||
// ListTopics provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListTopics(_a0 *sns.ListTopicsInput) (*sns.ListTopicsOutput, error) {
|
||||
func (_m *MockFakeSNS) ListTopics(_a0 *sns.ListTopicsInput) (*sns.ListTopicsOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.ListTopicsOutput
|
||||
|
@ -1740,7 +1740,7 @@ func (_m *SNSClient) ListTopics(_a0 *sns.ListTopicsInput) (*sns.ListTopicsOutput
|
|||
}
|
||||
|
||||
// ListTopicsPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *SNSClient) ListTopicsPages(_a0 *sns.ListTopicsInput, _a1 func(*sns.ListTopicsOutput, bool) bool) error {
|
||||
func (_m *MockFakeSNS) ListTopicsPages(_a0 *sns.ListTopicsInput, _a1 func(*sns.ListTopicsOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -1754,7 +1754,7 @@ func (_m *SNSClient) ListTopicsPages(_a0 *sns.ListTopicsInput, _a1 func(*sns.Lis
|
|||
}
|
||||
|
||||
// ListTopicsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *SNSClient) ListTopicsPagesWithContext(_a0 context.Context, _a1 *sns.ListTopicsInput, _a2 func(*sns.ListTopicsOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeSNS) ListTopicsPagesWithContext(_a0 context.Context, _a1 *sns.ListTopicsInput, _a2 func(*sns.ListTopicsOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -1775,7 +1775,7 @@ func (_m *SNSClient) ListTopicsPagesWithContext(_a0 context.Context, _a1 *sns.Li
|
|||
}
|
||||
|
||||
// ListTopicsRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) ListTopicsRequest(_a0 *sns.ListTopicsInput) (*request.Request, *sns.ListTopicsOutput) {
|
||||
func (_m *MockFakeSNS) ListTopicsRequest(_a0 *sns.ListTopicsInput) (*request.Request, *sns.ListTopicsOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1800,7 +1800,7 @@ func (_m *SNSClient) ListTopicsRequest(_a0 *sns.ListTopicsInput) (*request.Reque
|
|||
}
|
||||
|
||||
// ListTopicsWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) ListTopicsWithContext(_a0 context.Context, _a1 *sns.ListTopicsInput, _a2 ...request.Option) (*sns.ListTopicsOutput, error) {
|
||||
func (_m *MockFakeSNS) ListTopicsWithContext(_a0 context.Context, _a1 *sns.ListTopicsInput, _a2 ...request.Option) (*sns.ListTopicsOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1830,7 +1830,7 @@ func (_m *SNSClient) ListTopicsWithContext(_a0 context.Context, _a1 *sns.ListTop
|
|||
}
|
||||
|
||||
// OptInPhoneNumber provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) OptInPhoneNumber(_a0 *sns.OptInPhoneNumberInput) (*sns.OptInPhoneNumberOutput, error) {
|
||||
func (_m *MockFakeSNS) OptInPhoneNumber(_a0 *sns.OptInPhoneNumberInput) (*sns.OptInPhoneNumberOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.OptInPhoneNumberOutput
|
||||
|
@ -1853,7 +1853,7 @@ func (_m *SNSClient) OptInPhoneNumber(_a0 *sns.OptInPhoneNumberInput) (*sns.OptI
|
|||
}
|
||||
|
||||
// OptInPhoneNumberRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) OptInPhoneNumberRequest(_a0 *sns.OptInPhoneNumberInput) (*request.Request, *sns.OptInPhoneNumberOutput) {
|
||||
func (_m *MockFakeSNS) OptInPhoneNumberRequest(_a0 *sns.OptInPhoneNumberInput) (*request.Request, *sns.OptInPhoneNumberOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1878,7 +1878,7 @@ func (_m *SNSClient) OptInPhoneNumberRequest(_a0 *sns.OptInPhoneNumberInput) (*r
|
|||
}
|
||||
|
||||
// OptInPhoneNumberWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) OptInPhoneNumberWithContext(_a0 context.Context, _a1 *sns.OptInPhoneNumberInput, _a2 ...request.Option) (*sns.OptInPhoneNumberOutput, error) {
|
||||
func (_m *MockFakeSNS) OptInPhoneNumberWithContext(_a0 context.Context, _a1 *sns.OptInPhoneNumberInput, _a2 ...request.Option) (*sns.OptInPhoneNumberOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1908,7 +1908,7 @@ func (_m *SNSClient) OptInPhoneNumberWithContext(_a0 context.Context, _a1 *sns.O
|
|||
}
|
||||
|
||||
// Publish provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) Publish(_a0 *sns.PublishInput) (*sns.PublishOutput, error) {
|
||||
func (_m *MockFakeSNS) Publish(_a0 *sns.PublishInput) (*sns.PublishOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.PublishOutput
|
||||
|
@ -1931,7 +1931,7 @@ func (_m *SNSClient) Publish(_a0 *sns.PublishInput) (*sns.PublishOutput, error)
|
|||
}
|
||||
|
||||
// PublishRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) PublishRequest(_a0 *sns.PublishInput) (*request.Request, *sns.PublishOutput) {
|
||||
func (_m *MockFakeSNS) PublishRequest(_a0 *sns.PublishInput) (*request.Request, *sns.PublishOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1956,7 +1956,7 @@ func (_m *SNSClient) PublishRequest(_a0 *sns.PublishInput) (*request.Request, *s
|
|||
}
|
||||
|
||||
// PublishWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) PublishWithContext(_a0 context.Context, _a1 *sns.PublishInput, _a2 ...request.Option) (*sns.PublishOutput, error) {
|
||||
func (_m *MockFakeSNS) PublishWithContext(_a0 context.Context, _a1 *sns.PublishInput, _a2 ...request.Option) (*sns.PublishOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1986,7 +1986,7 @@ func (_m *SNSClient) PublishWithContext(_a0 context.Context, _a1 *sns.PublishInp
|
|||
}
|
||||
|
||||
// RemovePermission provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) RemovePermission(_a0 *sns.RemovePermissionInput) (*sns.RemovePermissionOutput, error) {
|
||||
func (_m *MockFakeSNS) RemovePermission(_a0 *sns.RemovePermissionInput) (*sns.RemovePermissionOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.RemovePermissionOutput
|
||||
|
@ -2009,7 +2009,7 @@ func (_m *SNSClient) RemovePermission(_a0 *sns.RemovePermissionInput) (*sns.Remo
|
|||
}
|
||||
|
||||
// RemovePermissionRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) RemovePermissionRequest(_a0 *sns.RemovePermissionInput) (*request.Request, *sns.RemovePermissionOutput) {
|
||||
func (_m *MockFakeSNS) RemovePermissionRequest(_a0 *sns.RemovePermissionInput) (*request.Request, *sns.RemovePermissionOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2034,7 +2034,7 @@ func (_m *SNSClient) RemovePermissionRequest(_a0 *sns.RemovePermissionInput) (*r
|
|||
}
|
||||
|
||||
// RemovePermissionWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) RemovePermissionWithContext(_a0 context.Context, _a1 *sns.RemovePermissionInput, _a2 ...request.Option) (*sns.RemovePermissionOutput, error) {
|
||||
func (_m *MockFakeSNS) RemovePermissionWithContext(_a0 context.Context, _a1 *sns.RemovePermissionInput, _a2 ...request.Option) (*sns.RemovePermissionOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2064,7 +2064,7 @@ func (_m *SNSClient) RemovePermissionWithContext(_a0 context.Context, _a1 *sns.R
|
|||
}
|
||||
|
||||
// SetEndpointAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetEndpointAttributes(_a0 *sns.SetEndpointAttributesInput) (*sns.SetEndpointAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetEndpointAttributes(_a0 *sns.SetEndpointAttributesInput) (*sns.SetEndpointAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.SetEndpointAttributesOutput
|
||||
|
@ -2087,7 +2087,7 @@ func (_m *SNSClient) SetEndpointAttributes(_a0 *sns.SetEndpointAttributesInput)
|
|||
}
|
||||
|
||||
// SetEndpointAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetEndpointAttributesRequest(_a0 *sns.SetEndpointAttributesInput) (*request.Request, *sns.SetEndpointAttributesOutput) {
|
||||
func (_m *MockFakeSNS) SetEndpointAttributesRequest(_a0 *sns.SetEndpointAttributesInput) (*request.Request, *sns.SetEndpointAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2112,7 +2112,7 @@ func (_m *SNSClient) SetEndpointAttributesRequest(_a0 *sns.SetEndpointAttributes
|
|||
}
|
||||
|
||||
// SetEndpointAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) SetEndpointAttributesWithContext(_a0 context.Context, _a1 *sns.SetEndpointAttributesInput, _a2 ...request.Option) (*sns.SetEndpointAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetEndpointAttributesWithContext(_a0 context.Context, _a1 *sns.SetEndpointAttributesInput, _a2 ...request.Option) (*sns.SetEndpointAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2142,7 +2142,7 @@ func (_m *SNSClient) SetEndpointAttributesWithContext(_a0 context.Context, _a1 *
|
|||
}
|
||||
|
||||
// SetPlatformApplicationAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetPlatformApplicationAttributes(_a0 *sns.SetPlatformApplicationAttributesInput) (*sns.SetPlatformApplicationAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetPlatformApplicationAttributes(_a0 *sns.SetPlatformApplicationAttributesInput) (*sns.SetPlatformApplicationAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.SetPlatformApplicationAttributesOutput
|
||||
|
@ -2165,7 +2165,7 @@ func (_m *SNSClient) SetPlatformApplicationAttributes(_a0 *sns.SetPlatformApplic
|
|||
}
|
||||
|
||||
// SetPlatformApplicationAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetPlatformApplicationAttributesRequest(_a0 *sns.SetPlatformApplicationAttributesInput) (*request.Request, *sns.SetPlatformApplicationAttributesOutput) {
|
||||
func (_m *MockFakeSNS) SetPlatformApplicationAttributesRequest(_a0 *sns.SetPlatformApplicationAttributesInput) (*request.Request, *sns.SetPlatformApplicationAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2190,7 +2190,7 @@ func (_m *SNSClient) SetPlatformApplicationAttributesRequest(_a0 *sns.SetPlatfor
|
|||
}
|
||||
|
||||
// SetPlatformApplicationAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) SetPlatformApplicationAttributesWithContext(_a0 context.Context, _a1 *sns.SetPlatformApplicationAttributesInput, _a2 ...request.Option) (*sns.SetPlatformApplicationAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetPlatformApplicationAttributesWithContext(_a0 context.Context, _a1 *sns.SetPlatformApplicationAttributesInput, _a2 ...request.Option) (*sns.SetPlatformApplicationAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2220,7 +2220,7 @@ func (_m *SNSClient) SetPlatformApplicationAttributesWithContext(_a0 context.Con
|
|||
}
|
||||
|
||||
// SetSMSAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetSMSAttributes(_a0 *sns.SetSMSAttributesInput) (*sns.SetSMSAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetSMSAttributes(_a0 *sns.SetSMSAttributesInput) (*sns.SetSMSAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.SetSMSAttributesOutput
|
||||
|
@ -2243,7 +2243,7 @@ func (_m *SNSClient) SetSMSAttributes(_a0 *sns.SetSMSAttributesInput) (*sns.SetS
|
|||
}
|
||||
|
||||
// SetSMSAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetSMSAttributesRequest(_a0 *sns.SetSMSAttributesInput) (*request.Request, *sns.SetSMSAttributesOutput) {
|
||||
func (_m *MockFakeSNS) SetSMSAttributesRequest(_a0 *sns.SetSMSAttributesInput) (*request.Request, *sns.SetSMSAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2268,7 +2268,7 @@ func (_m *SNSClient) SetSMSAttributesRequest(_a0 *sns.SetSMSAttributesInput) (*r
|
|||
}
|
||||
|
||||
// SetSMSAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) SetSMSAttributesWithContext(_a0 context.Context, _a1 *sns.SetSMSAttributesInput, _a2 ...request.Option) (*sns.SetSMSAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetSMSAttributesWithContext(_a0 context.Context, _a1 *sns.SetSMSAttributesInput, _a2 ...request.Option) (*sns.SetSMSAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2298,7 +2298,7 @@ func (_m *SNSClient) SetSMSAttributesWithContext(_a0 context.Context, _a1 *sns.S
|
|||
}
|
||||
|
||||
// SetSubscriptionAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetSubscriptionAttributes(_a0 *sns.SetSubscriptionAttributesInput) (*sns.SetSubscriptionAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetSubscriptionAttributes(_a0 *sns.SetSubscriptionAttributesInput) (*sns.SetSubscriptionAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.SetSubscriptionAttributesOutput
|
||||
|
@ -2321,7 +2321,7 @@ func (_m *SNSClient) SetSubscriptionAttributes(_a0 *sns.SetSubscriptionAttribute
|
|||
}
|
||||
|
||||
// SetSubscriptionAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetSubscriptionAttributesRequest(_a0 *sns.SetSubscriptionAttributesInput) (*request.Request, *sns.SetSubscriptionAttributesOutput) {
|
||||
func (_m *MockFakeSNS) SetSubscriptionAttributesRequest(_a0 *sns.SetSubscriptionAttributesInput) (*request.Request, *sns.SetSubscriptionAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2346,7 +2346,7 @@ func (_m *SNSClient) SetSubscriptionAttributesRequest(_a0 *sns.SetSubscriptionAt
|
|||
}
|
||||
|
||||
// SetSubscriptionAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) SetSubscriptionAttributesWithContext(_a0 context.Context, _a1 *sns.SetSubscriptionAttributesInput, _a2 ...request.Option) (*sns.SetSubscriptionAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetSubscriptionAttributesWithContext(_a0 context.Context, _a1 *sns.SetSubscriptionAttributesInput, _a2 ...request.Option) (*sns.SetSubscriptionAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2376,7 +2376,7 @@ func (_m *SNSClient) SetSubscriptionAttributesWithContext(_a0 context.Context, _
|
|||
}
|
||||
|
||||
// SetTopicAttributes provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetTopicAttributes(_a0 *sns.SetTopicAttributesInput) (*sns.SetTopicAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetTopicAttributes(_a0 *sns.SetTopicAttributesInput) (*sns.SetTopicAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.SetTopicAttributesOutput
|
||||
|
@ -2399,7 +2399,7 @@ func (_m *SNSClient) SetTopicAttributes(_a0 *sns.SetTopicAttributesInput) (*sns.
|
|||
}
|
||||
|
||||
// SetTopicAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SetTopicAttributesRequest(_a0 *sns.SetTopicAttributesInput) (*request.Request, *sns.SetTopicAttributesOutput) {
|
||||
func (_m *MockFakeSNS) SetTopicAttributesRequest(_a0 *sns.SetTopicAttributesInput) (*request.Request, *sns.SetTopicAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2424,7 +2424,7 @@ func (_m *SNSClient) SetTopicAttributesRequest(_a0 *sns.SetTopicAttributesInput)
|
|||
}
|
||||
|
||||
// SetTopicAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) SetTopicAttributesWithContext(_a0 context.Context, _a1 *sns.SetTopicAttributesInput, _a2 ...request.Option) (*sns.SetTopicAttributesOutput, error) {
|
||||
func (_m *MockFakeSNS) SetTopicAttributesWithContext(_a0 context.Context, _a1 *sns.SetTopicAttributesInput, _a2 ...request.Option) (*sns.SetTopicAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2454,7 +2454,7 @@ func (_m *SNSClient) SetTopicAttributesWithContext(_a0 context.Context, _a1 *sns
|
|||
}
|
||||
|
||||
// Subscribe provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) Subscribe(_a0 *sns.SubscribeInput) (*sns.SubscribeOutput, error) {
|
||||
func (_m *MockFakeSNS) Subscribe(_a0 *sns.SubscribeInput) (*sns.SubscribeOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.SubscribeOutput
|
||||
|
@ -2477,7 +2477,7 @@ func (_m *SNSClient) Subscribe(_a0 *sns.SubscribeInput) (*sns.SubscribeOutput, e
|
|||
}
|
||||
|
||||
// SubscribeRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) SubscribeRequest(_a0 *sns.SubscribeInput) (*request.Request, *sns.SubscribeOutput) {
|
||||
func (_m *MockFakeSNS) SubscribeRequest(_a0 *sns.SubscribeInput) (*request.Request, *sns.SubscribeOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2502,7 +2502,7 @@ func (_m *SNSClient) SubscribeRequest(_a0 *sns.SubscribeInput) (*request.Request
|
|||
}
|
||||
|
||||
// SubscribeWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) SubscribeWithContext(_a0 context.Context, _a1 *sns.SubscribeInput, _a2 ...request.Option) (*sns.SubscribeOutput, error) {
|
||||
func (_m *MockFakeSNS) SubscribeWithContext(_a0 context.Context, _a1 *sns.SubscribeInput, _a2 ...request.Option) (*sns.SubscribeOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2532,7 +2532,7 @@ func (_m *SNSClient) SubscribeWithContext(_a0 context.Context, _a1 *sns.Subscrib
|
|||
}
|
||||
|
||||
// TagResource provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) TagResource(_a0 *sns.TagResourceInput) (*sns.TagResourceOutput, error) {
|
||||
func (_m *MockFakeSNS) TagResource(_a0 *sns.TagResourceInput) (*sns.TagResourceOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.TagResourceOutput
|
||||
|
@ -2555,7 +2555,7 @@ func (_m *SNSClient) TagResource(_a0 *sns.TagResourceInput) (*sns.TagResourceOut
|
|||
}
|
||||
|
||||
// TagResourceRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) TagResourceRequest(_a0 *sns.TagResourceInput) (*request.Request, *sns.TagResourceOutput) {
|
||||
func (_m *MockFakeSNS) TagResourceRequest(_a0 *sns.TagResourceInput) (*request.Request, *sns.TagResourceOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2580,7 +2580,7 @@ func (_m *SNSClient) TagResourceRequest(_a0 *sns.TagResourceInput) (*request.Req
|
|||
}
|
||||
|
||||
// TagResourceWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) TagResourceWithContext(_a0 context.Context, _a1 *sns.TagResourceInput, _a2 ...request.Option) (*sns.TagResourceOutput, error) {
|
||||
func (_m *MockFakeSNS) TagResourceWithContext(_a0 context.Context, _a1 *sns.TagResourceInput, _a2 ...request.Option) (*sns.TagResourceOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2610,7 +2610,7 @@ func (_m *SNSClient) TagResourceWithContext(_a0 context.Context, _a1 *sns.TagRes
|
|||
}
|
||||
|
||||
// Unsubscribe provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) Unsubscribe(_a0 *sns.UnsubscribeInput) (*sns.UnsubscribeOutput, error) {
|
||||
func (_m *MockFakeSNS) Unsubscribe(_a0 *sns.UnsubscribeInput) (*sns.UnsubscribeOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.UnsubscribeOutput
|
||||
|
@ -2633,7 +2633,7 @@ func (_m *SNSClient) Unsubscribe(_a0 *sns.UnsubscribeInput) (*sns.UnsubscribeOut
|
|||
}
|
||||
|
||||
// UnsubscribeRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) UnsubscribeRequest(_a0 *sns.UnsubscribeInput) (*request.Request, *sns.UnsubscribeOutput) {
|
||||
func (_m *MockFakeSNS) UnsubscribeRequest(_a0 *sns.UnsubscribeInput) (*request.Request, *sns.UnsubscribeOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2658,7 +2658,7 @@ func (_m *SNSClient) UnsubscribeRequest(_a0 *sns.UnsubscribeInput) (*request.Req
|
|||
}
|
||||
|
||||
// UnsubscribeWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) UnsubscribeWithContext(_a0 context.Context, _a1 *sns.UnsubscribeInput, _a2 ...request.Option) (*sns.UnsubscribeOutput, error) {
|
||||
func (_m *MockFakeSNS) UnsubscribeWithContext(_a0 context.Context, _a1 *sns.UnsubscribeInput, _a2 ...request.Option) (*sns.UnsubscribeOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -2688,7 +2688,7 @@ func (_m *SNSClient) UnsubscribeWithContext(_a0 context.Context, _a1 *sns.Unsubs
|
|||
}
|
||||
|
||||
// UntagResource provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) UntagResource(_a0 *sns.UntagResourceInput) (*sns.UntagResourceOutput, error) {
|
||||
func (_m *MockFakeSNS) UntagResource(_a0 *sns.UntagResourceInput) (*sns.UntagResourceOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sns.UntagResourceOutput
|
||||
|
@ -2711,7 +2711,7 @@ func (_m *SNSClient) UntagResource(_a0 *sns.UntagResourceInput) (*sns.UntagResou
|
|||
}
|
||||
|
||||
// UntagResourceRequest provides a mock function with given fields: _a0
|
||||
func (_m *SNSClient) UntagResourceRequest(_a0 *sns.UntagResourceInput) (*request.Request, *sns.UntagResourceOutput) {
|
||||
func (_m *MockFakeSNS) UntagResourceRequest(_a0 *sns.UntagResourceInput) (*request.Request, *sns.UntagResourceOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -2736,7 +2736,7 @@ func (_m *SNSClient) UntagResourceRequest(_a0 *sns.UntagResourceInput) (*request
|
|||
}
|
||||
|
||||
// UntagResourceWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *SNSClient) UntagResourceWithContext(_a0 context.Context, _a1 *sns.UntagResourceInput, _a2 ...request.Option) (*sns.UntagResourceOutput, error) {
|
||||
func (_m *MockFakeSNS) UntagResourceWithContext(_a0 context.Context, _a1 *sns.UntagResourceInput, _a2 ...request.Option) (*sns.UntagResourceOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
||||
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
package aws
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
@ -11,13 +11,13 @@ import (
|
|||
sqs "github.com/aws/aws-sdk-go/service/sqs"
|
||||
)
|
||||
|
||||
// FakeSQS is an autogenerated mock type for the FakeSQS type
|
||||
type FakeSQS struct {
|
||||
// MockFakeSQS is an autogenerated mock type for the FakeSQS type
|
||||
type MockFakeSQS struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// AddPermission provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) AddPermission(_a0 *sqs.AddPermissionInput) (*sqs.AddPermissionOutput, error) {
|
||||
func (_m *MockFakeSQS) AddPermission(_a0 *sqs.AddPermissionInput) (*sqs.AddPermissionOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.AddPermissionOutput
|
||||
|
@ -40,7 +40,7 @@ func (_m *FakeSQS) AddPermission(_a0 *sqs.AddPermissionInput) (*sqs.AddPermissio
|
|||
}
|
||||
|
||||
// AddPermissionRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) AddPermissionRequest(_a0 *sqs.AddPermissionInput) (*request.Request, *sqs.AddPermissionOutput) {
|
||||
func (_m *MockFakeSQS) AddPermissionRequest(_a0 *sqs.AddPermissionInput) (*request.Request, *sqs.AddPermissionOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -65,7 +65,7 @@ func (_m *FakeSQS) AddPermissionRequest(_a0 *sqs.AddPermissionInput) (*request.R
|
|||
}
|
||||
|
||||
// AddPermissionWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) AddPermissionWithContext(_a0 context.Context, _a1 *sqs.AddPermissionInput, _a2 ...request.Option) (*sqs.AddPermissionOutput, error) {
|
||||
func (_m *MockFakeSQS) AddPermissionWithContext(_a0 context.Context, _a1 *sqs.AddPermissionInput, _a2 ...request.Option) (*sqs.AddPermissionOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -95,7 +95,7 @@ func (_m *FakeSQS) AddPermissionWithContext(_a0 context.Context, _a1 *sqs.AddPer
|
|||
}
|
||||
|
||||
// ChangeMessageVisibility provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ChangeMessageVisibility(_a0 *sqs.ChangeMessageVisibilityInput) (*sqs.ChangeMessageVisibilityOutput, error) {
|
||||
func (_m *MockFakeSQS) ChangeMessageVisibility(_a0 *sqs.ChangeMessageVisibilityInput) (*sqs.ChangeMessageVisibilityOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.ChangeMessageVisibilityOutput
|
||||
|
@ -118,7 +118,7 @@ func (_m *FakeSQS) ChangeMessageVisibility(_a0 *sqs.ChangeMessageVisibilityInput
|
|||
}
|
||||
|
||||
// ChangeMessageVisibilityBatch provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ChangeMessageVisibilityBatch(_a0 *sqs.ChangeMessageVisibilityBatchInput) (*sqs.ChangeMessageVisibilityBatchOutput, error) {
|
||||
func (_m *MockFakeSQS) ChangeMessageVisibilityBatch(_a0 *sqs.ChangeMessageVisibilityBatchInput) (*sqs.ChangeMessageVisibilityBatchOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.ChangeMessageVisibilityBatchOutput
|
||||
|
@ -141,7 +141,7 @@ func (_m *FakeSQS) ChangeMessageVisibilityBatch(_a0 *sqs.ChangeMessageVisibility
|
|||
}
|
||||
|
||||
// ChangeMessageVisibilityBatchRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ChangeMessageVisibilityBatchRequest(_a0 *sqs.ChangeMessageVisibilityBatchInput) (*request.Request, *sqs.ChangeMessageVisibilityBatchOutput) {
|
||||
func (_m *MockFakeSQS) ChangeMessageVisibilityBatchRequest(_a0 *sqs.ChangeMessageVisibilityBatchInput) (*request.Request, *sqs.ChangeMessageVisibilityBatchOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -166,7 +166,7 @@ func (_m *FakeSQS) ChangeMessageVisibilityBatchRequest(_a0 *sqs.ChangeMessageVis
|
|||
}
|
||||
|
||||
// ChangeMessageVisibilityBatchWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) ChangeMessageVisibilityBatchWithContext(_a0 context.Context, _a1 *sqs.ChangeMessageVisibilityBatchInput, _a2 ...request.Option) (*sqs.ChangeMessageVisibilityBatchOutput, error) {
|
||||
func (_m *MockFakeSQS) ChangeMessageVisibilityBatchWithContext(_a0 context.Context, _a1 *sqs.ChangeMessageVisibilityBatchInput, _a2 ...request.Option) (*sqs.ChangeMessageVisibilityBatchOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -196,7 +196,7 @@ func (_m *FakeSQS) ChangeMessageVisibilityBatchWithContext(_a0 context.Context,
|
|||
}
|
||||
|
||||
// ChangeMessageVisibilityRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ChangeMessageVisibilityRequest(_a0 *sqs.ChangeMessageVisibilityInput) (*request.Request, *sqs.ChangeMessageVisibilityOutput) {
|
||||
func (_m *MockFakeSQS) ChangeMessageVisibilityRequest(_a0 *sqs.ChangeMessageVisibilityInput) (*request.Request, *sqs.ChangeMessageVisibilityOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -221,7 +221,7 @@ func (_m *FakeSQS) ChangeMessageVisibilityRequest(_a0 *sqs.ChangeMessageVisibili
|
|||
}
|
||||
|
||||
// ChangeMessageVisibilityWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) ChangeMessageVisibilityWithContext(_a0 context.Context, _a1 *sqs.ChangeMessageVisibilityInput, _a2 ...request.Option) (*sqs.ChangeMessageVisibilityOutput, error) {
|
||||
func (_m *MockFakeSQS) ChangeMessageVisibilityWithContext(_a0 context.Context, _a1 *sqs.ChangeMessageVisibilityInput, _a2 ...request.Option) (*sqs.ChangeMessageVisibilityOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -251,7 +251,7 @@ func (_m *FakeSQS) ChangeMessageVisibilityWithContext(_a0 context.Context, _a1 *
|
|||
}
|
||||
|
||||
// CreateQueue provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) CreateQueue(_a0 *sqs.CreateQueueInput) (*sqs.CreateQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) CreateQueue(_a0 *sqs.CreateQueueInput) (*sqs.CreateQueueOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.CreateQueueOutput
|
||||
|
@ -274,7 +274,7 @@ func (_m *FakeSQS) CreateQueue(_a0 *sqs.CreateQueueInput) (*sqs.CreateQueueOutpu
|
|||
}
|
||||
|
||||
// CreateQueueRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) CreateQueueRequest(_a0 *sqs.CreateQueueInput) (*request.Request, *sqs.CreateQueueOutput) {
|
||||
func (_m *MockFakeSQS) CreateQueueRequest(_a0 *sqs.CreateQueueInput) (*request.Request, *sqs.CreateQueueOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -299,7 +299,7 @@ func (_m *FakeSQS) CreateQueueRequest(_a0 *sqs.CreateQueueInput) (*request.Reque
|
|||
}
|
||||
|
||||
// CreateQueueWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) CreateQueueWithContext(_a0 context.Context, _a1 *sqs.CreateQueueInput, _a2 ...request.Option) (*sqs.CreateQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) CreateQueueWithContext(_a0 context.Context, _a1 *sqs.CreateQueueInput, _a2 ...request.Option) (*sqs.CreateQueueOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -329,7 +329,7 @@ func (_m *FakeSQS) CreateQueueWithContext(_a0 context.Context, _a1 *sqs.CreateQu
|
|||
}
|
||||
|
||||
// DeleteMessage provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) DeleteMessage(_a0 *sqs.DeleteMessageInput) (*sqs.DeleteMessageOutput, error) {
|
||||
func (_m *MockFakeSQS) DeleteMessage(_a0 *sqs.DeleteMessageInput) (*sqs.DeleteMessageOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.DeleteMessageOutput
|
||||
|
@ -352,7 +352,7 @@ func (_m *FakeSQS) DeleteMessage(_a0 *sqs.DeleteMessageInput) (*sqs.DeleteMessag
|
|||
}
|
||||
|
||||
// DeleteMessageBatch provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) DeleteMessageBatch(_a0 *sqs.DeleteMessageBatchInput) (*sqs.DeleteMessageBatchOutput, error) {
|
||||
func (_m *MockFakeSQS) DeleteMessageBatch(_a0 *sqs.DeleteMessageBatchInput) (*sqs.DeleteMessageBatchOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.DeleteMessageBatchOutput
|
||||
|
@ -375,7 +375,7 @@ func (_m *FakeSQS) DeleteMessageBatch(_a0 *sqs.DeleteMessageBatchInput) (*sqs.De
|
|||
}
|
||||
|
||||
// DeleteMessageBatchRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) DeleteMessageBatchRequest(_a0 *sqs.DeleteMessageBatchInput) (*request.Request, *sqs.DeleteMessageBatchOutput) {
|
||||
func (_m *MockFakeSQS) DeleteMessageBatchRequest(_a0 *sqs.DeleteMessageBatchInput) (*request.Request, *sqs.DeleteMessageBatchOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -400,7 +400,7 @@ func (_m *FakeSQS) DeleteMessageBatchRequest(_a0 *sqs.DeleteMessageBatchInput) (
|
|||
}
|
||||
|
||||
// DeleteMessageBatchWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) DeleteMessageBatchWithContext(_a0 context.Context, _a1 *sqs.DeleteMessageBatchInput, _a2 ...request.Option) (*sqs.DeleteMessageBatchOutput, error) {
|
||||
func (_m *MockFakeSQS) DeleteMessageBatchWithContext(_a0 context.Context, _a1 *sqs.DeleteMessageBatchInput, _a2 ...request.Option) (*sqs.DeleteMessageBatchOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -430,7 +430,7 @@ func (_m *FakeSQS) DeleteMessageBatchWithContext(_a0 context.Context, _a1 *sqs.D
|
|||
}
|
||||
|
||||
// DeleteMessageRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) DeleteMessageRequest(_a0 *sqs.DeleteMessageInput) (*request.Request, *sqs.DeleteMessageOutput) {
|
||||
func (_m *MockFakeSQS) DeleteMessageRequest(_a0 *sqs.DeleteMessageInput) (*request.Request, *sqs.DeleteMessageOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -455,7 +455,7 @@ func (_m *FakeSQS) DeleteMessageRequest(_a0 *sqs.DeleteMessageInput) (*request.R
|
|||
}
|
||||
|
||||
// DeleteMessageWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) DeleteMessageWithContext(_a0 context.Context, _a1 *sqs.DeleteMessageInput, _a2 ...request.Option) (*sqs.DeleteMessageOutput, error) {
|
||||
func (_m *MockFakeSQS) DeleteMessageWithContext(_a0 context.Context, _a1 *sqs.DeleteMessageInput, _a2 ...request.Option) (*sqs.DeleteMessageOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -485,7 +485,7 @@ func (_m *FakeSQS) DeleteMessageWithContext(_a0 context.Context, _a1 *sqs.Delete
|
|||
}
|
||||
|
||||
// DeleteQueue provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) DeleteQueue(_a0 *sqs.DeleteQueueInput) (*sqs.DeleteQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) DeleteQueue(_a0 *sqs.DeleteQueueInput) (*sqs.DeleteQueueOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.DeleteQueueOutput
|
||||
|
@ -508,7 +508,7 @@ func (_m *FakeSQS) DeleteQueue(_a0 *sqs.DeleteQueueInput) (*sqs.DeleteQueueOutpu
|
|||
}
|
||||
|
||||
// DeleteQueueRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) DeleteQueueRequest(_a0 *sqs.DeleteQueueInput) (*request.Request, *sqs.DeleteQueueOutput) {
|
||||
func (_m *MockFakeSQS) DeleteQueueRequest(_a0 *sqs.DeleteQueueInput) (*request.Request, *sqs.DeleteQueueOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -533,7 +533,7 @@ func (_m *FakeSQS) DeleteQueueRequest(_a0 *sqs.DeleteQueueInput) (*request.Reque
|
|||
}
|
||||
|
||||
// DeleteQueueWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) DeleteQueueWithContext(_a0 context.Context, _a1 *sqs.DeleteQueueInput, _a2 ...request.Option) (*sqs.DeleteQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) DeleteQueueWithContext(_a0 context.Context, _a1 *sqs.DeleteQueueInput, _a2 ...request.Option) (*sqs.DeleteQueueOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -563,7 +563,7 @@ func (_m *FakeSQS) DeleteQueueWithContext(_a0 context.Context, _a1 *sqs.DeleteQu
|
|||
}
|
||||
|
||||
// GetQueueAttributes provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) GetQueueAttributes(_a0 *sqs.GetQueueAttributesInput) (*sqs.GetQueueAttributesOutput, error) {
|
||||
func (_m *MockFakeSQS) GetQueueAttributes(_a0 *sqs.GetQueueAttributesInput) (*sqs.GetQueueAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.GetQueueAttributesOutput
|
||||
|
@ -586,7 +586,7 @@ func (_m *FakeSQS) GetQueueAttributes(_a0 *sqs.GetQueueAttributesInput) (*sqs.Ge
|
|||
}
|
||||
|
||||
// GetQueueAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) GetQueueAttributesRequest(_a0 *sqs.GetQueueAttributesInput) (*request.Request, *sqs.GetQueueAttributesOutput) {
|
||||
func (_m *MockFakeSQS) GetQueueAttributesRequest(_a0 *sqs.GetQueueAttributesInput) (*request.Request, *sqs.GetQueueAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -611,7 +611,7 @@ func (_m *FakeSQS) GetQueueAttributesRequest(_a0 *sqs.GetQueueAttributesInput) (
|
|||
}
|
||||
|
||||
// GetQueueAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) GetQueueAttributesWithContext(_a0 context.Context, _a1 *sqs.GetQueueAttributesInput, _a2 ...request.Option) (*sqs.GetQueueAttributesOutput, error) {
|
||||
func (_m *MockFakeSQS) GetQueueAttributesWithContext(_a0 context.Context, _a1 *sqs.GetQueueAttributesInput, _a2 ...request.Option) (*sqs.GetQueueAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -641,7 +641,7 @@ func (_m *FakeSQS) GetQueueAttributesWithContext(_a0 context.Context, _a1 *sqs.G
|
|||
}
|
||||
|
||||
// GetQueueUrl provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) GetQueueUrl(_a0 *sqs.GetQueueUrlInput) (*sqs.GetQueueUrlOutput, error) {
|
||||
func (_m *MockFakeSQS) GetQueueUrl(_a0 *sqs.GetQueueUrlInput) (*sqs.GetQueueUrlOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.GetQueueUrlOutput
|
||||
|
@ -664,7 +664,7 @@ func (_m *FakeSQS) GetQueueUrl(_a0 *sqs.GetQueueUrlInput) (*sqs.GetQueueUrlOutpu
|
|||
}
|
||||
|
||||
// GetQueueUrlRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) GetQueueUrlRequest(_a0 *sqs.GetQueueUrlInput) (*request.Request, *sqs.GetQueueUrlOutput) {
|
||||
func (_m *MockFakeSQS) GetQueueUrlRequest(_a0 *sqs.GetQueueUrlInput) (*request.Request, *sqs.GetQueueUrlOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -689,7 +689,7 @@ func (_m *FakeSQS) GetQueueUrlRequest(_a0 *sqs.GetQueueUrlInput) (*request.Reque
|
|||
}
|
||||
|
||||
// GetQueueUrlWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) GetQueueUrlWithContext(_a0 context.Context, _a1 *sqs.GetQueueUrlInput, _a2 ...request.Option) (*sqs.GetQueueUrlOutput, error) {
|
||||
func (_m *MockFakeSQS) GetQueueUrlWithContext(_a0 context.Context, _a1 *sqs.GetQueueUrlInput, _a2 ...request.Option) (*sqs.GetQueueUrlOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -719,7 +719,7 @@ func (_m *FakeSQS) GetQueueUrlWithContext(_a0 context.Context, _a1 *sqs.GetQueue
|
|||
}
|
||||
|
||||
// ListDeadLetterSourceQueues provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ListDeadLetterSourceQueues(_a0 *sqs.ListDeadLetterSourceQueuesInput) (*sqs.ListDeadLetterSourceQueuesOutput, error) {
|
||||
func (_m *MockFakeSQS) ListDeadLetterSourceQueues(_a0 *sqs.ListDeadLetterSourceQueuesInput) (*sqs.ListDeadLetterSourceQueuesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.ListDeadLetterSourceQueuesOutput
|
||||
|
@ -742,7 +742,7 @@ func (_m *FakeSQS) ListDeadLetterSourceQueues(_a0 *sqs.ListDeadLetterSourceQueue
|
|||
}
|
||||
|
||||
// ListDeadLetterSourceQueuesPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *FakeSQS) ListDeadLetterSourceQueuesPages(_a0 *sqs.ListDeadLetterSourceQueuesInput, _a1 func(*sqs.ListDeadLetterSourceQueuesOutput, bool) bool) error {
|
||||
func (_m *MockFakeSQS) ListDeadLetterSourceQueuesPages(_a0 *sqs.ListDeadLetterSourceQueuesInput, _a1 func(*sqs.ListDeadLetterSourceQueuesOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -756,7 +756,7 @@ func (_m *FakeSQS) ListDeadLetterSourceQueuesPages(_a0 *sqs.ListDeadLetterSource
|
|||
}
|
||||
|
||||
// ListDeadLetterSourceQueuesPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *FakeSQS) ListDeadLetterSourceQueuesPagesWithContext(_a0 context.Context, _a1 *sqs.ListDeadLetterSourceQueuesInput, _a2 func(*sqs.ListDeadLetterSourceQueuesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeSQS) ListDeadLetterSourceQueuesPagesWithContext(_a0 context.Context, _a1 *sqs.ListDeadLetterSourceQueuesInput, _a2 func(*sqs.ListDeadLetterSourceQueuesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -777,7 +777,7 @@ func (_m *FakeSQS) ListDeadLetterSourceQueuesPagesWithContext(_a0 context.Contex
|
|||
}
|
||||
|
||||
// ListDeadLetterSourceQueuesRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ListDeadLetterSourceQueuesRequest(_a0 *sqs.ListDeadLetterSourceQueuesInput) (*request.Request, *sqs.ListDeadLetterSourceQueuesOutput) {
|
||||
func (_m *MockFakeSQS) ListDeadLetterSourceQueuesRequest(_a0 *sqs.ListDeadLetterSourceQueuesInput) (*request.Request, *sqs.ListDeadLetterSourceQueuesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -802,7 +802,7 @@ func (_m *FakeSQS) ListDeadLetterSourceQueuesRequest(_a0 *sqs.ListDeadLetterSour
|
|||
}
|
||||
|
||||
// ListDeadLetterSourceQueuesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) ListDeadLetterSourceQueuesWithContext(_a0 context.Context, _a1 *sqs.ListDeadLetterSourceQueuesInput, _a2 ...request.Option) (*sqs.ListDeadLetterSourceQueuesOutput, error) {
|
||||
func (_m *MockFakeSQS) ListDeadLetterSourceQueuesWithContext(_a0 context.Context, _a1 *sqs.ListDeadLetterSourceQueuesInput, _a2 ...request.Option) (*sqs.ListDeadLetterSourceQueuesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -832,7 +832,7 @@ func (_m *FakeSQS) ListDeadLetterSourceQueuesWithContext(_a0 context.Context, _a
|
|||
}
|
||||
|
||||
// ListQueueTags provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ListQueueTags(_a0 *sqs.ListQueueTagsInput) (*sqs.ListQueueTagsOutput, error) {
|
||||
func (_m *MockFakeSQS) ListQueueTags(_a0 *sqs.ListQueueTagsInput) (*sqs.ListQueueTagsOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.ListQueueTagsOutput
|
||||
|
@ -855,7 +855,7 @@ func (_m *FakeSQS) ListQueueTags(_a0 *sqs.ListQueueTagsInput) (*sqs.ListQueueTag
|
|||
}
|
||||
|
||||
// ListQueueTagsRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ListQueueTagsRequest(_a0 *sqs.ListQueueTagsInput) (*request.Request, *sqs.ListQueueTagsOutput) {
|
||||
func (_m *MockFakeSQS) ListQueueTagsRequest(_a0 *sqs.ListQueueTagsInput) (*request.Request, *sqs.ListQueueTagsOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -880,7 +880,7 @@ func (_m *FakeSQS) ListQueueTagsRequest(_a0 *sqs.ListQueueTagsInput) (*request.R
|
|||
}
|
||||
|
||||
// ListQueueTagsWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) ListQueueTagsWithContext(_a0 context.Context, _a1 *sqs.ListQueueTagsInput, _a2 ...request.Option) (*sqs.ListQueueTagsOutput, error) {
|
||||
func (_m *MockFakeSQS) ListQueueTagsWithContext(_a0 context.Context, _a1 *sqs.ListQueueTagsInput, _a2 ...request.Option) (*sqs.ListQueueTagsOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -910,7 +910,7 @@ func (_m *FakeSQS) ListQueueTagsWithContext(_a0 context.Context, _a1 *sqs.ListQu
|
|||
}
|
||||
|
||||
// ListQueues provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ListQueues(_a0 *sqs.ListQueuesInput) (*sqs.ListQueuesOutput, error) {
|
||||
func (_m *MockFakeSQS) ListQueues(_a0 *sqs.ListQueuesInput) (*sqs.ListQueuesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.ListQueuesOutput
|
||||
|
@ -933,7 +933,7 @@ func (_m *FakeSQS) ListQueues(_a0 *sqs.ListQueuesInput) (*sqs.ListQueuesOutput,
|
|||
}
|
||||
|
||||
// ListQueuesPages provides a mock function with given fields: _a0, _a1
|
||||
func (_m *FakeSQS) ListQueuesPages(_a0 *sqs.ListQueuesInput, _a1 func(*sqs.ListQueuesOutput, bool) bool) error {
|
||||
func (_m *MockFakeSQS) ListQueuesPages(_a0 *sqs.ListQueuesInput, _a1 func(*sqs.ListQueuesOutput, bool) bool) error {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 error
|
||||
|
@ -947,7 +947,7 @@ func (_m *FakeSQS) ListQueuesPages(_a0 *sqs.ListQueuesInput, _a1 func(*sqs.ListQ
|
|||
}
|
||||
|
||||
// ListQueuesPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3
|
||||
func (_m *FakeSQS) ListQueuesPagesWithContext(_a0 context.Context, _a1 *sqs.ListQueuesInput, _a2 func(*sqs.ListQueuesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
func (_m *MockFakeSQS) ListQueuesPagesWithContext(_a0 context.Context, _a1 *sqs.ListQueuesInput, _a2 func(*sqs.ListQueuesOutput, bool) bool, _a3 ...request.Option) error {
|
||||
_va := make([]interface{}, len(_a3))
|
||||
for _i := range _a3 {
|
||||
_va[_i] = _a3[_i]
|
||||
|
@ -968,7 +968,7 @@ func (_m *FakeSQS) ListQueuesPagesWithContext(_a0 context.Context, _a1 *sqs.List
|
|||
}
|
||||
|
||||
// ListQueuesRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ListQueuesRequest(_a0 *sqs.ListQueuesInput) (*request.Request, *sqs.ListQueuesOutput) {
|
||||
func (_m *MockFakeSQS) ListQueuesRequest(_a0 *sqs.ListQueuesInput) (*request.Request, *sqs.ListQueuesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -993,7 +993,7 @@ func (_m *FakeSQS) ListQueuesRequest(_a0 *sqs.ListQueuesInput) (*request.Request
|
|||
}
|
||||
|
||||
// ListQueuesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) ListQueuesWithContext(_a0 context.Context, _a1 *sqs.ListQueuesInput, _a2 ...request.Option) (*sqs.ListQueuesOutput, error) {
|
||||
func (_m *MockFakeSQS) ListQueuesWithContext(_a0 context.Context, _a1 *sqs.ListQueuesInput, _a2 ...request.Option) (*sqs.ListQueuesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1023,7 +1023,7 @@ func (_m *FakeSQS) ListQueuesWithContext(_a0 context.Context, _a1 *sqs.ListQueue
|
|||
}
|
||||
|
||||
// PurgeQueue provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) PurgeQueue(_a0 *sqs.PurgeQueueInput) (*sqs.PurgeQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) PurgeQueue(_a0 *sqs.PurgeQueueInput) (*sqs.PurgeQueueOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.PurgeQueueOutput
|
||||
|
@ -1046,7 +1046,7 @@ func (_m *FakeSQS) PurgeQueue(_a0 *sqs.PurgeQueueInput) (*sqs.PurgeQueueOutput,
|
|||
}
|
||||
|
||||
// PurgeQueueRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) PurgeQueueRequest(_a0 *sqs.PurgeQueueInput) (*request.Request, *sqs.PurgeQueueOutput) {
|
||||
func (_m *MockFakeSQS) PurgeQueueRequest(_a0 *sqs.PurgeQueueInput) (*request.Request, *sqs.PurgeQueueOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1071,7 +1071,7 @@ func (_m *FakeSQS) PurgeQueueRequest(_a0 *sqs.PurgeQueueInput) (*request.Request
|
|||
}
|
||||
|
||||
// PurgeQueueWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) PurgeQueueWithContext(_a0 context.Context, _a1 *sqs.PurgeQueueInput, _a2 ...request.Option) (*sqs.PurgeQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) PurgeQueueWithContext(_a0 context.Context, _a1 *sqs.PurgeQueueInput, _a2 ...request.Option) (*sqs.PurgeQueueOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1101,7 +1101,7 @@ func (_m *FakeSQS) PurgeQueueWithContext(_a0 context.Context, _a1 *sqs.PurgeQueu
|
|||
}
|
||||
|
||||
// ReceiveMessage provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ReceiveMessage(_a0 *sqs.ReceiveMessageInput) (*sqs.ReceiveMessageOutput, error) {
|
||||
func (_m *MockFakeSQS) ReceiveMessage(_a0 *sqs.ReceiveMessageInput) (*sqs.ReceiveMessageOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.ReceiveMessageOutput
|
||||
|
@ -1124,7 +1124,7 @@ func (_m *FakeSQS) ReceiveMessage(_a0 *sqs.ReceiveMessageInput) (*sqs.ReceiveMes
|
|||
}
|
||||
|
||||
// ReceiveMessageRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) ReceiveMessageRequest(_a0 *sqs.ReceiveMessageInput) (*request.Request, *sqs.ReceiveMessageOutput) {
|
||||
func (_m *MockFakeSQS) ReceiveMessageRequest(_a0 *sqs.ReceiveMessageInput) (*request.Request, *sqs.ReceiveMessageOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1149,7 +1149,7 @@ func (_m *FakeSQS) ReceiveMessageRequest(_a0 *sqs.ReceiveMessageInput) (*request
|
|||
}
|
||||
|
||||
// ReceiveMessageWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) ReceiveMessageWithContext(_a0 context.Context, _a1 *sqs.ReceiveMessageInput, _a2 ...request.Option) (*sqs.ReceiveMessageOutput, error) {
|
||||
func (_m *MockFakeSQS) ReceiveMessageWithContext(_a0 context.Context, _a1 *sqs.ReceiveMessageInput, _a2 ...request.Option) (*sqs.ReceiveMessageOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1179,7 +1179,7 @@ func (_m *FakeSQS) ReceiveMessageWithContext(_a0 context.Context, _a1 *sqs.Recei
|
|||
}
|
||||
|
||||
// RemovePermission provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) RemovePermission(_a0 *sqs.RemovePermissionInput) (*sqs.RemovePermissionOutput, error) {
|
||||
func (_m *MockFakeSQS) RemovePermission(_a0 *sqs.RemovePermissionInput) (*sqs.RemovePermissionOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.RemovePermissionOutput
|
||||
|
@ -1202,7 +1202,7 @@ func (_m *FakeSQS) RemovePermission(_a0 *sqs.RemovePermissionInput) (*sqs.Remove
|
|||
}
|
||||
|
||||
// RemovePermissionRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) RemovePermissionRequest(_a0 *sqs.RemovePermissionInput) (*request.Request, *sqs.RemovePermissionOutput) {
|
||||
func (_m *MockFakeSQS) RemovePermissionRequest(_a0 *sqs.RemovePermissionInput) (*request.Request, *sqs.RemovePermissionOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1227,7 +1227,7 @@ func (_m *FakeSQS) RemovePermissionRequest(_a0 *sqs.RemovePermissionInput) (*req
|
|||
}
|
||||
|
||||
// RemovePermissionWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) RemovePermissionWithContext(_a0 context.Context, _a1 *sqs.RemovePermissionInput, _a2 ...request.Option) (*sqs.RemovePermissionOutput, error) {
|
||||
func (_m *MockFakeSQS) RemovePermissionWithContext(_a0 context.Context, _a1 *sqs.RemovePermissionInput, _a2 ...request.Option) (*sqs.RemovePermissionOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1257,7 +1257,7 @@ func (_m *FakeSQS) RemovePermissionWithContext(_a0 context.Context, _a1 *sqs.Rem
|
|||
}
|
||||
|
||||
// SendMessage provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) SendMessage(_a0 *sqs.SendMessageInput) (*sqs.SendMessageOutput, error) {
|
||||
func (_m *MockFakeSQS) SendMessage(_a0 *sqs.SendMessageInput) (*sqs.SendMessageOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.SendMessageOutput
|
||||
|
@ -1280,7 +1280,7 @@ func (_m *FakeSQS) SendMessage(_a0 *sqs.SendMessageInput) (*sqs.SendMessageOutpu
|
|||
}
|
||||
|
||||
// SendMessageBatch provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) SendMessageBatch(_a0 *sqs.SendMessageBatchInput) (*sqs.SendMessageBatchOutput, error) {
|
||||
func (_m *MockFakeSQS) SendMessageBatch(_a0 *sqs.SendMessageBatchInput) (*sqs.SendMessageBatchOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.SendMessageBatchOutput
|
||||
|
@ -1303,7 +1303,7 @@ func (_m *FakeSQS) SendMessageBatch(_a0 *sqs.SendMessageBatchInput) (*sqs.SendMe
|
|||
}
|
||||
|
||||
// SendMessageBatchRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) SendMessageBatchRequest(_a0 *sqs.SendMessageBatchInput) (*request.Request, *sqs.SendMessageBatchOutput) {
|
||||
func (_m *MockFakeSQS) SendMessageBatchRequest(_a0 *sqs.SendMessageBatchInput) (*request.Request, *sqs.SendMessageBatchOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1328,7 +1328,7 @@ func (_m *FakeSQS) SendMessageBatchRequest(_a0 *sqs.SendMessageBatchInput) (*req
|
|||
}
|
||||
|
||||
// SendMessageBatchWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) SendMessageBatchWithContext(_a0 context.Context, _a1 *sqs.SendMessageBatchInput, _a2 ...request.Option) (*sqs.SendMessageBatchOutput, error) {
|
||||
func (_m *MockFakeSQS) SendMessageBatchWithContext(_a0 context.Context, _a1 *sqs.SendMessageBatchInput, _a2 ...request.Option) (*sqs.SendMessageBatchOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1358,7 +1358,7 @@ func (_m *FakeSQS) SendMessageBatchWithContext(_a0 context.Context, _a1 *sqs.Sen
|
|||
}
|
||||
|
||||
// SendMessageRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) SendMessageRequest(_a0 *sqs.SendMessageInput) (*request.Request, *sqs.SendMessageOutput) {
|
||||
func (_m *MockFakeSQS) SendMessageRequest(_a0 *sqs.SendMessageInput) (*request.Request, *sqs.SendMessageOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1383,7 +1383,7 @@ func (_m *FakeSQS) SendMessageRequest(_a0 *sqs.SendMessageInput) (*request.Reque
|
|||
}
|
||||
|
||||
// SendMessageWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) SendMessageWithContext(_a0 context.Context, _a1 *sqs.SendMessageInput, _a2 ...request.Option) (*sqs.SendMessageOutput, error) {
|
||||
func (_m *MockFakeSQS) SendMessageWithContext(_a0 context.Context, _a1 *sqs.SendMessageInput, _a2 ...request.Option) (*sqs.SendMessageOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1413,7 +1413,7 @@ func (_m *FakeSQS) SendMessageWithContext(_a0 context.Context, _a1 *sqs.SendMess
|
|||
}
|
||||
|
||||
// SetQueueAttributes provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) SetQueueAttributes(_a0 *sqs.SetQueueAttributesInput) (*sqs.SetQueueAttributesOutput, error) {
|
||||
func (_m *MockFakeSQS) SetQueueAttributes(_a0 *sqs.SetQueueAttributesInput) (*sqs.SetQueueAttributesOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.SetQueueAttributesOutput
|
||||
|
@ -1436,7 +1436,7 @@ func (_m *FakeSQS) SetQueueAttributes(_a0 *sqs.SetQueueAttributesInput) (*sqs.Se
|
|||
}
|
||||
|
||||
// SetQueueAttributesRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) SetQueueAttributesRequest(_a0 *sqs.SetQueueAttributesInput) (*request.Request, *sqs.SetQueueAttributesOutput) {
|
||||
func (_m *MockFakeSQS) SetQueueAttributesRequest(_a0 *sqs.SetQueueAttributesInput) (*request.Request, *sqs.SetQueueAttributesOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1461,7 +1461,7 @@ func (_m *FakeSQS) SetQueueAttributesRequest(_a0 *sqs.SetQueueAttributesInput) (
|
|||
}
|
||||
|
||||
// SetQueueAttributesWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) SetQueueAttributesWithContext(_a0 context.Context, _a1 *sqs.SetQueueAttributesInput, _a2 ...request.Option) (*sqs.SetQueueAttributesOutput, error) {
|
||||
func (_m *MockFakeSQS) SetQueueAttributesWithContext(_a0 context.Context, _a1 *sqs.SetQueueAttributesInput, _a2 ...request.Option) (*sqs.SetQueueAttributesOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1491,7 +1491,7 @@ func (_m *FakeSQS) SetQueueAttributesWithContext(_a0 context.Context, _a1 *sqs.S
|
|||
}
|
||||
|
||||
// TagQueue provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) TagQueue(_a0 *sqs.TagQueueInput) (*sqs.TagQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) TagQueue(_a0 *sqs.TagQueueInput) (*sqs.TagQueueOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.TagQueueOutput
|
||||
|
@ -1514,7 +1514,7 @@ func (_m *FakeSQS) TagQueue(_a0 *sqs.TagQueueInput) (*sqs.TagQueueOutput, error)
|
|||
}
|
||||
|
||||
// TagQueueRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) TagQueueRequest(_a0 *sqs.TagQueueInput) (*request.Request, *sqs.TagQueueOutput) {
|
||||
func (_m *MockFakeSQS) TagQueueRequest(_a0 *sqs.TagQueueInput) (*request.Request, *sqs.TagQueueOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1539,7 +1539,7 @@ func (_m *FakeSQS) TagQueueRequest(_a0 *sqs.TagQueueInput) (*request.Request, *s
|
|||
}
|
||||
|
||||
// TagQueueWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) TagQueueWithContext(_a0 context.Context, _a1 *sqs.TagQueueInput, _a2 ...request.Option) (*sqs.TagQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) TagQueueWithContext(_a0 context.Context, _a1 *sqs.TagQueueInput, _a2 ...request.Option) (*sqs.TagQueueOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
||||
|
@ -1569,7 +1569,7 @@ func (_m *FakeSQS) TagQueueWithContext(_a0 context.Context, _a1 *sqs.TagQueueInp
|
|||
}
|
||||
|
||||
// UntagQueue provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) UntagQueue(_a0 *sqs.UntagQueueInput) (*sqs.UntagQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) UntagQueue(_a0 *sqs.UntagQueueInput) (*sqs.UntagQueueOutput, error) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *sqs.UntagQueueOutput
|
||||
|
@ -1592,7 +1592,7 @@ func (_m *FakeSQS) UntagQueue(_a0 *sqs.UntagQueueInput) (*sqs.UntagQueueOutput,
|
|||
}
|
||||
|
||||
// UntagQueueRequest provides a mock function with given fields: _a0
|
||||
func (_m *FakeSQS) UntagQueueRequest(_a0 *sqs.UntagQueueInput) (*request.Request, *sqs.UntagQueueOutput) {
|
||||
func (_m *MockFakeSQS) UntagQueueRequest(_a0 *sqs.UntagQueueInput) (*request.Request, *sqs.UntagQueueOutput) {
|
||||
ret := _m.Called(_a0)
|
||||
|
||||
var r0 *request.Request
|
||||
|
@ -1617,7 +1617,7 @@ func (_m *FakeSQS) UntagQueueRequest(_a0 *sqs.UntagQueueInput) (*request.Request
|
|||
}
|
||||
|
||||
// UntagQueueWithContext provides a mock function with given fields: _a0, _a1, _a2
|
||||
func (_m *FakeSQS) UntagQueueWithContext(_a0 context.Context, _a1 *sqs.UntagQueueInput, _a2 ...request.Option) (*sqs.UntagQueueOutput, error) {
|
||||
func (_m *MockFakeSQS) UntagQueueWithContext(_a0 context.Context, _a1 *sqs.UntagQueueInput, _a2 ...request.Option) (*sqs.UntagQueueOutput, error) {
|
||||
_va := make([]interface{}, len(_a2))
|
||||
for _i := range _a2 {
|
||||
_va[_i] = _a2[_i]
|
|
@ -0,0 +1,7 @@
|
|||
package aws
|
||||
|
||||
import "github.com/aws/aws-sdk-go/service/route53/route53iface"
|
||||
|
||||
type FakeRoute53 interface {
|
||||
route53iface.Route53API
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/service/sns/snsiface"
|
||||
)
|
||||
|
||||
type FakeSNS interface {
|
||||
snsiface.SNSAPI
|
||||
}
|
Loading…
Reference in New Issue