github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/pkg/operation/k8s/automock/k8_s_client.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package automock
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    11  
    12  	v1alpha1 "github.com/kyma-incubator/compass/components/operations-controller/api/v1alpha1"
    13  )
    14  
    15  // K8SClient is an autogenerated mock type for the K8SClient type
    16  type K8SClient struct {
    17  	mock.Mock
    18  }
    19  
    20  // Create provides a mock function with given fields: ctx, operation
    21  func (_m *K8SClient) Create(ctx context.Context, operation *v1alpha1.Operation) (*v1alpha1.Operation, error) {
    22  	ret := _m.Called(ctx, operation)
    23  
    24  	var r0 *v1alpha1.Operation
    25  	if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Operation) *v1alpha1.Operation); ok {
    26  		r0 = rf(ctx, operation)
    27  	} else {
    28  		if ret.Get(0) != nil {
    29  			r0 = ret.Get(0).(*v1alpha1.Operation)
    30  		}
    31  	}
    32  
    33  	var r1 error
    34  	if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Operation) error); ok {
    35  		r1 = rf(ctx, operation)
    36  	} else {
    37  		r1 = ret.Error(1)
    38  	}
    39  
    40  	return r0, r1
    41  }
    42  
    43  // Get provides a mock function with given fields: ctx, name, options
    44  func (_m *K8SClient) Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.Operation, error) {
    45  	ret := _m.Called(ctx, name, options)
    46  
    47  	var r0 *v1alpha1.Operation
    48  	if rf, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions) *v1alpha1.Operation); ok {
    49  		r0 = rf(ctx, name, options)
    50  	} else {
    51  		if ret.Get(0) != nil {
    52  			r0 = ret.Get(0).(*v1alpha1.Operation)
    53  		}
    54  	}
    55  
    56  	var r1 error
    57  	if rf, ok := ret.Get(1).(func(context.Context, string, v1.GetOptions) error); ok {
    58  		r1 = rf(ctx, name, options)
    59  	} else {
    60  		r1 = ret.Error(1)
    61  	}
    62  
    63  	return r0, r1
    64  }
    65  
    66  // Update provides a mock function with given fields: ctx, operation
    67  func (_m *K8SClient) Update(ctx context.Context, operation *v1alpha1.Operation) (*v1alpha1.Operation, error) {
    68  	ret := _m.Called(ctx, operation)
    69  
    70  	var r0 *v1alpha1.Operation
    71  	if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Operation) *v1alpha1.Operation); ok {
    72  		r0 = rf(ctx, operation)
    73  	} else {
    74  		if ret.Get(0) != nil {
    75  			r0 = ret.Get(0).(*v1alpha1.Operation)
    76  		}
    77  	}
    78  
    79  	var r1 error
    80  	if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Operation) error); ok {
    81  		r1 = rf(ctx, operation)
    82  	} else {
    83  		r1 = ret.Error(1)
    84  	}
    85  
    86  	return r0, r1
    87  }
    88  
    89  type mockConstructorTestingTNewK8SClient interface {
    90  	mock.TestingT
    91  	Cleanup(func())
    92  }
    93  
    94  // NewK8SClient creates a new instance of K8SClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    95  func NewK8SClient(t mockConstructorTestingTNewK8SClient) *K8SClient {
    96  	mock := &K8SClient{}
    97  	mock.Mock.Test(t)
    98  
    99  	t.Cleanup(func() { mock.AssertExpectations(t) })
   100  
   101  	return mock
   102  }