// Code generated by mockery v2.53.3. DO NOT EDIT.

package exec

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	wait "gitlab.com/gitlab-org/gitlab-runner/executors/docker/internal/wait"
)

// MockDocker is an autogenerated mock type for the Docker type
type MockDocker struct {
	mock.Mock
}

type MockDocker_Expecter struct {
	mock *mock.Mock
}

func (_m *MockDocker) EXPECT() *MockDocker_Expecter {
	return &MockDocker_Expecter{mock: &_m.Mock}
}

// Exec provides a mock function with given fields: ctx, containerID, streams, gracefulExitFunc
func (_m *MockDocker) Exec(ctx context.Context, containerID string, streams IOStreams, gracefulExitFunc wait.GracefulExitFunc) error {
	ret := _m.Called(ctx, containerID, streams, gracefulExitFunc)

	if len(ret) == 0 {
		panic("no return value specified for Exec")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, IOStreams, wait.GracefulExitFunc) error); ok {
		r0 = rf(ctx, containerID, streams, gracefulExitFunc)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockDocker_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
type MockDocker_Exec_Call struct {
	*mock.Call
}

// Exec is a helper method to define mock.On call
//   - ctx context.Context
//   - containerID string
//   - streams IOStreams
//   - gracefulExitFunc wait.GracefulExitFunc
func (_e *MockDocker_Expecter) Exec(ctx interface{}, containerID interface{}, streams interface{}, gracefulExitFunc interface{}) *MockDocker_Exec_Call {
	return &MockDocker_Exec_Call{Call: _e.mock.On("Exec", ctx, containerID, streams, gracefulExitFunc)}
}

func (_c *MockDocker_Exec_Call) Run(run func(ctx context.Context, containerID string, streams IOStreams, gracefulExitFunc wait.GracefulExitFunc)) *MockDocker_Exec_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(IOStreams), args[3].(wait.GracefulExitFunc))
	})
	return _c
}

func (_c *MockDocker_Exec_Call) Return(_a0 error) *MockDocker_Exec_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockDocker_Exec_Call) RunAndReturn(run func(context.Context, string, IOStreams, wait.GracefulExitFunc) error) *MockDocker_Exec_Call {
	_c.Call.Return(run)
	return _c
}

// NewMockDocker creates a new instance of MockDocker. 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 NewMockDocker(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDocker {
	mock := &MockDocker{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
