mirror of
https://github.com/thegeeklab/wp-s3-action.git
synced 2024-11-25 10:20:39 +00:00
113 lines
4.1 KiB
Go
113 lines
4.1 KiB
Go
|
// Code generated by mockery v2.43.0. DO NOT EDIT.
|
||
|
|
||
|
package mocks
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
|
||
|
cloudfront "github.com/aws/aws-sdk-go-v2/service/cloudfront"
|
||
|
|
||
|
mock "github.com/stretchr/testify/mock"
|
||
|
)
|
||
|
|
||
|
// MockCloudfrontAPIClient is an autogenerated mock type for the CloudfrontAPIClient type
|
||
|
type MockCloudfrontAPIClient struct {
|
||
|
mock.Mock
|
||
|
}
|
||
|
|
||
|
type MockCloudfrontAPIClient_Expecter struct {
|
||
|
mock *mock.Mock
|
||
|
}
|
||
|
|
||
|
func (_m *MockCloudfrontAPIClient) EXPECT() *MockCloudfrontAPIClient_Expecter {
|
||
|
return &MockCloudfrontAPIClient_Expecter{mock: &_m.Mock}
|
||
|
}
|
||
|
|
||
|
// CreateInvalidation provides a mock function with given fields: ctx, params, optFns
|
||
|
func (_m *MockCloudfrontAPIClient) CreateInvalidation(ctx context.Context, params *cloudfront.CreateInvalidationInput, optFns ...func(*cloudfront.Options)) (*cloudfront.CreateInvalidationOutput, error) {
|
||
|
_va := make([]interface{}, len(optFns))
|
||
|
for _i := range optFns {
|
||
|
_va[_i] = optFns[_i]
|
||
|
}
|
||
|
var _ca []interface{}
|
||
|
_ca = append(_ca, ctx, params)
|
||
|
_ca = append(_ca, _va...)
|
||
|
ret := _m.Called(_ca...)
|
||
|
|
||
|
if len(ret) == 0 {
|
||
|
panic("no return value specified for CreateInvalidation")
|
||
|
}
|
||
|
|
||
|
var r0 *cloudfront.CreateInvalidationOutput
|
||
|
var r1 error
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, *cloudfront.CreateInvalidationInput, ...func(*cloudfront.Options)) (*cloudfront.CreateInvalidationOutput, error)); ok {
|
||
|
return rf(ctx, params, optFns...)
|
||
|
}
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, *cloudfront.CreateInvalidationInput, ...func(*cloudfront.Options)) *cloudfront.CreateInvalidationOutput); ok {
|
||
|
r0 = rf(ctx, params, optFns...)
|
||
|
} else {
|
||
|
if ret.Get(0) != nil {
|
||
|
r0 = ret.Get(0).(*cloudfront.CreateInvalidationOutput)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if rf, ok := ret.Get(1).(func(context.Context, *cloudfront.CreateInvalidationInput, ...func(*cloudfront.Options)) error); ok {
|
||
|
r1 = rf(ctx, params, optFns...)
|
||
|
} else {
|
||
|
r1 = ret.Error(1)
|
||
|
}
|
||
|
|
||
|
return r0, r1
|
||
|
}
|
||
|
|
||
|
// MockCloudfrontAPIClient_CreateInvalidation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateInvalidation'
|
||
|
type MockCloudfrontAPIClient_CreateInvalidation_Call struct {
|
||
|
*mock.Call
|
||
|
}
|
||
|
|
||
|
// CreateInvalidation is a helper method to define mock.On call
|
||
|
// - ctx context.Context
|
||
|
// - params *cloudfront.CreateInvalidationInput
|
||
|
// - optFns ...func(*cloudfront.Options)
|
||
|
func (_e *MockCloudfrontAPIClient_Expecter) CreateInvalidation(ctx interface{}, params interface{}, optFns ...interface{}) *MockCloudfrontAPIClient_CreateInvalidation_Call {
|
||
|
return &MockCloudfrontAPIClient_CreateInvalidation_Call{Call: _e.mock.On("CreateInvalidation",
|
||
|
append([]interface{}{ctx, params}, optFns...)...)}
|
||
|
}
|
||
|
|
||
|
func (_c *MockCloudfrontAPIClient_CreateInvalidation_Call) Run(run func(ctx context.Context, params *cloudfront.CreateInvalidationInput, optFns ...func(*cloudfront.Options))) *MockCloudfrontAPIClient_CreateInvalidation_Call {
|
||
|
_c.Call.Run(func(args mock.Arguments) {
|
||
|
variadicArgs := make([]func(*cloudfront.Options), len(args)-2)
|
||
|
for i, a := range args[2:] {
|
||
|
if a != nil {
|
||
|
variadicArgs[i] = a.(func(*cloudfront.Options))
|
||
|
}
|
||
|
}
|
||
|
run(args[0].(context.Context), args[1].(*cloudfront.CreateInvalidationInput), variadicArgs...)
|
||
|
})
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *MockCloudfrontAPIClient_CreateInvalidation_Call) Return(_a0 *cloudfront.CreateInvalidationOutput, _a1 error) *MockCloudfrontAPIClient_CreateInvalidation_Call {
|
||
|
_c.Call.Return(_a0, _a1)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *MockCloudfrontAPIClient_CreateInvalidation_Call) RunAndReturn(run func(context.Context, *cloudfront.CreateInvalidationInput, ...func(*cloudfront.Options)) (*cloudfront.CreateInvalidationOutput, error)) *MockCloudfrontAPIClient_CreateInvalidation_Call {
|
||
|
_c.Call.Return(run)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
// NewMockCloudfrontAPIClient creates a new instance of MockCloudfrontAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||
|
// The first argument is typically a *testing.T value.
|
||
|
func NewMockCloudfrontAPIClient(t interface {
|
||
|
mock.TestingT
|
||
|
Cleanup(func())
|
||
|
}) *MockCloudfrontAPIClient {
|
||
|
mock := &MockCloudfrontAPIClient{}
|
||
|
mock.Mock.Test(t)
|
||
|
|
||
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||
|
|
||
|
return mock
|
||
|
}
|