github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/environmentscleanup/automock/GardenerClient.go (about)

     1  // Code generated by mockery v2.16.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
    11  
    12  	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    13  )
    14  
    15  // GardenerClient is an autogenerated mock type for the GardenerClient type
    16  type GardenerClient struct {
    17  	mock.Mock
    18  }
    19  
    20  // Delete provides a mock function with given fields: ctx, name, options, subresources
    21  func (_m *GardenerClient) Delete(ctx context.Context, name string, options v1.DeleteOptions, subresources ...string) error {
    22  	_va := make([]interface{}, len(subresources))
    23  	for _i := range subresources {
    24  		_va[_i] = subresources[_i]
    25  	}
    26  	var _ca []interface{}
    27  	_ca = append(_ca, ctx, name, options)
    28  	_ca = append(_ca, _va...)
    29  	ret := _m.Called(_ca...)
    30  
    31  	var r0 error
    32  	if rf, ok := ret.Get(0).(func(context.Context, string, v1.DeleteOptions, ...string) error); ok {
    33  		r0 = rf(ctx, name, options, subresources...)
    34  	} else {
    35  		r0 = ret.Error(0)
    36  	}
    37  
    38  	return r0
    39  }
    40  
    41  // Get provides a mock function with given fields: ctx, name, options, subresources
    42  func (_m *GardenerClient) Get(ctx context.Context, name string, options v1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
    43  	_va := make([]interface{}, len(subresources))
    44  	for _i := range subresources {
    45  		_va[_i] = subresources[_i]
    46  	}
    47  	var _ca []interface{}
    48  	_ca = append(_ca, ctx, name, options)
    49  	_ca = append(_ca, _va...)
    50  	ret := _m.Called(_ca...)
    51  
    52  	var r0 *unstructured.Unstructured
    53  	if rf, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions, ...string) *unstructured.Unstructured); ok {
    54  		r0 = rf(ctx, name, options, subresources...)
    55  	} else {
    56  		if ret.Get(0) != nil {
    57  			r0 = ret.Get(0).(*unstructured.Unstructured)
    58  		}
    59  	}
    60  
    61  	var r1 error
    62  	if rf, ok := ret.Get(1).(func(context.Context, string, v1.GetOptions, ...string) error); ok {
    63  		r1 = rf(ctx, name, options, subresources...)
    64  	} else {
    65  		r1 = ret.Error(1)
    66  	}
    67  
    68  	return r0, r1
    69  }
    70  
    71  // List provides a mock function with given fields: _a0, opts
    72  func (_m *GardenerClient) List(_a0 context.Context, opts v1.ListOptions) (*unstructured.UnstructuredList, error) {
    73  	ret := _m.Called(_a0, opts)
    74  
    75  	var r0 *unstructured.UnstructuredList
    76  	if rf, ok := ret.Get(0).(func(context.Context, v1.ListOptions) *unstructured.UnstructuredList); ok {
    77  		r0 = rf(_a0, opts)
    78  	} else {
    79  		if ret.Get(0) != nil {
    80  			r0 = ret.Get(0).(*unstructured.UnstructuredList)
    81  		}
    82  	}
    83  
    84  	var r1 error
    85  	if rf, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok {
    86  		r1 = rf(_a0, opts)
    87  	} else {
    88  		r1 = ret.Error(1)
    89  	}
    90  
    91  	return r0, r1
    92  }
    93  
    94  // Update provides a mock function with given fields: ctx, obj, options, subresources
    95  func (_m *GardenerClient) Update(ctx context.Context, obj *unstructured.Unstructured, options v1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
    96  	_va := make([]interface{}, len(subresources))
    97  	for _i := range subresources {
    98  		_va[_i] = subresources[_i]
    99  	}
   100  	var _ca []interface{}
   101  	_ca = append(_ca, ctx, obj, options)
   102  	_ca = append(_ca, _va...)
   103  	ret := _m.Called(_ca...)
   104  
   105  	var r0 *unstructured.Unstructured
   106  	if rf, ok := ret.Get(0).(func(context.Context, *unstructured.Unstructured, v1.UpdateOptions, ...string) *unstructured.Unstructured); ok {
   107  		r0 = rf(ctx, obj, options, subresources...)
   108  	} else {
   109  		if ret.Get(0) != nil {
   110  			r0 = ret.Get(0).(*unstructured.Unstructured)
   111  		}
   112  	}
   113  
   114  	var r1 error
   115  	if rf, ok := ret.Get(1).(func(context.Context, *unstructured.Unstructured, v1.UpdateOptions, ...string) error); ok {
   116  		r1 = rf(ctx, obj, options, subresources...)
   117  	} else {
   118  		r1 = ret.Error(1)
   119  	}
   120  
   121  	return r0, r1
   122  }
   123  
   124  type mockConstructorTestingTNewGardenerClient interface {
   125  	mock.TestingT
   126  	Cleanup(func())
   127  }
   128  
   129  // NewGardenerClient creates a new instance of GardenerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   130  func NewGardenerClient(t mockConstructorTestingTNewGardenerClient) *GardenerClient {
   131  	mock := &GardenerClient{}
   132  	mock.Mock.Test(t)
   133  
   134  	t.Cleanup(func() { mock.AssertExpectations(t) })
   135  
   136  	return mock
   137  }