mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
Updates the agent injection routine to read the dev container's configuration so we can add display apps to the sub agent.
191 lines
6.9 KiB
Go
Generated
191 lines
6.9 KiB
Go
Generated
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: .. (interfaces: ContainerCLI,DevcontainerCLI)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -destination ./acmock.go -package acmock .. ContainerCLI,DevcontainerCLI
|
|
//
|
|
|
|
// Package acmock is a generated GoMock package.
|
|
package acmock
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
agentcontainers "github.com/coder/coder/v2/agent/agentcontainers"
|
|
codersdk "github.com/coder/coder/v2/codersdk"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockContainerCLI is a mock of ContainerCLI interface.
|
|
type MockContainerCLI struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockContainerCLIMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockContainerCLIMockRecorder is the mock recorder for MockContainerCLI.
|
|
type MockContainerCLIMockRecorder struct {
|
|
mock *MockContainerCLI
|
|
}
|
|
|
|
// NewMockContainerCLI creates a new mock instance.
|
|
func NewMockContainerCLI(ctrl *gomock.Controller) *MockContainerCLI {
|
|
mock := &MockContainerCLI{ctrl: ctrl}
|
|
mock.recorder = &MockContainerCLIMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockContainerCLI) EXPECT() *MockContainerCLIMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Copy mocks base method.
|
|
func (m *MockContainerCLI) Copy(ctx context.Context, containerName, src, dst string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Copy", ctx, containerName, src, dst)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Copy indicates an expected call of Copy.
|
|
func (mr *MockContainerCLIMockRecorder) Copy(ctx, containerName, src, dst any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockContainerCLI)(nil).Copy), ctx, containerName, src, dst)
|
|
}
|
|
|
|
// DetectArchitecture mocks base method.
|
|
func (m *MockContainerCLI) DetectArchitecture(ctx context.Context, containerName string) (string, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "DetectArchitecture", ctx, containerName)
|
|
ret0, _ := ret[0].(string)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// DetectArchitecture indicates an expected call of DetectArchitecture.
|
|
func (mr *MockContainerCLIMockRecorder) DetectArchitecture(ctx, containerName any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectArchitecture", reflect.TypeOf((*MockContainerCLI)(nil).DetectArchitecture), ctx, containerName)
|
|
}
|
|
|
|
// ExecAs mocks base method.
|
|
func (m *MockContainerCLI) ExecAs(ctx context.Context, containerName, user string, args ...string) ([]byte, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, containerName, user}
|
|
for _, a := range args {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "ExecAs", varargs...)
|
|
ret0, _ := ret[0].([]byte)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// ExecAs indicates an expected call of ExecAs.
|
|
func (mr *MockContainerCLIMockRecorder) ExecAs(ctx, containerName, user any, args ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, containerName, user}, args...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecAs", reflect.TypeOf((*MockContainerCLI)(nil).ExecAs), varargs...)
|
|
}
|
|
|
|
// List mocks base method.
|
|
func (m *MockContainerCLI) List(ctx context.Context) (codersdk.WorkspaceAgentListContainersResponse, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "List", ctx)
|
|
ret0, _ := ret[0].(codersdk.WorkspaceAgentListContainersResponse)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// List indicates an expected call of List.
|
|
func (mr *MockContainerCLIMockRecorder) List(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockContainerCLI)(nil).List), ctx)
|
|
}
|
|
|
|
// MockDevcontainerCLI is a mock of DevcontainerCLI interface.
|
|
type MockDevcontainerCLI struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockDevcontainerCLIMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockDevcontainerCLIMockRecorder is the mock recorder for MockDevcontainerCLI.
|
|
type MockDevcontainerCLIMockRecorder struct {
|
|
mock *MockDevcontainerCLI
|
|
}
|
|
|
|
// NewMockDevcontainerCLI creates a new mock instance.
|
|
func NewMockDevcontainerCLI(ctrl *gomock.Controller) *MockDevcontainerCLI {
|
|
mock := &MockDevcontainerCLI{ctrl: ctrl}
|
|
mock.recorder = &MockDevcontainerCLIMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockDevcontainerCLI) EXPECT() *MockDevcontainerCLIMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Exec mocks base method.
|
|
func (m *MockDevcontainerCLI) Exec(ctx context.Context, workspaceFolder, configPath, cmd string, cmdArgs []string, opts ...agentcontainers.DevcontainerCLIExecOptions) error {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, workspaceFolder, configPath, cmd, cmdArgs}
|
|
for _, a := range opts {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "Exec", varargs...)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Exec indicates an expected call of Exec.
|
|
func (mr *MockDevcontainerCLIMockRecorder) Exec(ctx, workspaceFolder, configPath, cmd, cmdArgs any, opts ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, workspaceFolder, configPath, cmd, cmdArgs}, opts...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockDevcontainerCLI)(nil).Exec), varargs...)
|
|
}
|
|
|
|
// ReadConfig mocks base method.
|
|
func (m *MockDevcontainerCLI) ReadConfig(ctx context.Context, workspaceFolder, configPath string, opts ...agentcontainers.DevcontainerCLIReadConfigOptions) (agentcontainers.DevcontainerConfig, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, workspaceFolder, configPath}
|
|
for _, a := range opts {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "ReadConfig", varargs...)
|
|
ret0, _ := ret[0].(agentcontainers.DevcontainerConfig)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// ReadConfig indicates an expected call of ReadConfig.
|
|
func (mr *MockDevcontainerCLIMockRecorder) ReadConfig(ctx, workspaceFolder, configPath any, opts ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, workspaceFolder, configPath}, opts...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadConfig", reflect.TypeOf((*MockDevcontainerCLI)(nil).ReadConfig), varargs...)
|
|
}
|
|
|
|
// Up mocks base method.
|
|
func (m *MockDevcontainerCLI) Up(ctx context.Context, workspaceFolder, configPath string, opts ...agentcontainers.DevcontainerCLIUpOptions) (string, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{ctx, workspaceFolder, configPath}
|
|
for _, a := range opts {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "Up", varargs...)
|
|
ret0, _ := ret[0].(string)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Up indicates an expected call of Up.
|
|
func (mr *MockDevcontainerCLIMockRecorder) Up(ctx, workspaceFolder, configPath any, opts ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{ctx, workspaceFolder, configPath}, opts...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Up", reflect.TypeOf((*MockDevcontainerCLI)(nil).Up), varargs...)
|
|
}
|