terraform/internal/cloudplugin/mock_cloudproto1/mock.go
Sarah French 2e5b5dee5d
Some checks failed
build / Determine intended Terraform version (push) Has been cancelled
build / Determine Go toolchain version (push) Has been cancelled
Quick Checks / Unit Tests (push) Has been cancelled
Quick Checks / Race Tests (push) Has been cancelled
Quick Checks / End-to-end Tests (push) Has been cancelled
Quick Checks / Code Consistency Checks (push) Has been cancelled
build / Generate release metadata (push) Has been cancelled
build / Build for freebsd_386 (push) Has been cancelled
build / Build for linux_386 (push) Has been cancelled
build / Build for openbsd_386 (push) Has been cancelled
build / Build for windows_386 (push) Has been cancelled
build / Build for darwin_amd64 (push) Has been cancelled
build / Build for freebsd_amd64 (push) Has been cancelled
build / Build for linux_amd64 (push) Has been cancelled
build / Build for openbsd_amd64 (push) Has been cancelled
build / Build for solaris_amd64 (push) Has been cancelled
build / Build for windows_amd64 (push) Has been cancelled
build / Build for freebsd_arm (push) Has been cancelled
build / Build for linux_arm (push) Has been cancelled
build / Build for darwin_arm64 (push) Has been cancelled
build / Build for linux_arm64 (push) Has been cancelled
build / Build for windows_arm64 (push) Has been cancelled
build / Build Docker image for linux_386 (push) Has been cancelled
build / Build Docker image for linux_amd64 (push) Has been cancelled
build / Build Docker image for linux_arm (push) Has been cancelled
build / Build Docker image for linux_arm64 (push) Has been cancelled
build / Build e2etest for linux_386 (push) Has been cancelled
build / Build e2etest for windows_386 (push) Has been cancelled
build / Build e2etest for darwin_amd64 (push) Has been cancelled
build / Build e2etest for linux_amd64 (push) Has been cancelled
build / Build e2etest for windows_amd64 (push) Has been cancelled
build / Build e2etest for linux_arm (push) Has been cancelled
build / Build e2etest for darwin_arm64 (push) Has been cancelled
build / Build e2etest for linux_arm64 (push) Has been cancelled
build / Run e2e test for linux_386 (push) Has been cancelled
build / Run e2e test for windows_386 (push) Has been cancelled
build / Run e2e test for darwin_amd64 (push) Has been cancelled
build / Run e2e test for linux_amd64 (push) Has been cancelled
build / Run e2e test for windows_amd64 (push) Has been cancelled
build / Run e2e test for linux_arm (push) Has been cancelled
build / Run e2e test for linux_arm64 (push) Has been cancelled
build / Run terraform-exec test for linux amd64 (push) Has been cancelled
Upgrade protoc and protoc-gen-go-grpc versions to matching terraform-plugin-go (#37647)
* Update protoc version in downloader script

* go get google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1

This matched terraform-plugin-go

* make protobuf

* Run `make protobuf`

* Update generator to handle generic types from google.golang.org/grpc

Looks like this was added in v1.69.3 in https://github.com/grpc/grpc-go/pull/7057 ?

* Run `make generate`

* Fix "cannot infer Res" compile error - more usage of generics

* More fixing compile errors due to switching to use of a generic

* Make putting `google.golang.org/grpc` import into generated files conditional

* Run `make generate`

* Update more places where generics now need to be used

* Update generator to handle any types from google.golang.org/grpc in same switch case.
2025-10-22 14:46:18 +01:00

188 lines
6.9 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/hashicorp/terraform/internal/cloudplugin/cloudproto1 (interfaces: CommandServiceClient,CommandService_ExecuteClient)
//
// Generated by this command:
//
// mockgen -destination mock.go github.com/hashicorp/terraform/internal/cloudplugin/cloudproto1 CommandServiceClient,CommandService_ExecuteClient
//
// Package mock_cloudproto1 is a generated GoMock package.
package mock_cloudproto1
import (
context "context"
reflect "reflect"
cloudproto1 "github.com/hashicorp/terraform/internal/cloudplugin/cloudproto1"
gomock "go.uber.org/mock/gomock"
grpc "google.golang.org/grpc"
metadata "google.golang.org/grpc/metadata"
)
// MockCommandServiceClient is a mock of CommandServiceClient interface.
type MockCommandServiceClient struct {
ctrl *gomock.Controller
recorder *MockCommandServiceClientMockRecorder
isgomock struct{}
}
// MockCommandServiceClientMockRecorder is the mock recorder for MockCommandServiceClient.
type MockCommandServiceClientMockRecorder struct {
mock *MockCommandServiceClient
}
// NewMockCommandServiceClient creates a new mock instance.
func NewMockCommandServiceClient(ctrl *gomock.Controller) *MockCommandServiceClient {
mock := &MockCommandServiceClient{ctrl: ctrl}
mock.recorder = &MockCommandServiceClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCommandServiceClient) EXPECT() *MockCommandServiceClientMockRecorder {
return m.recorder
}
// Execute mocks base method.
func (m *MockCommandServiceClient) Execute(ctx context.Context, in *cloudproto1.CommandRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[cloudproto1.CommandResponse], error) {
m.ctrl.T.Helper()
varargs := []any{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Execute", varargs...)
ret0, _ := ret[0].(grpc.ServerStreamingClient[cloudproto1.CommandResponse])
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Execute indicates an expected call of Execute.
func (mr *MockCommandServiceClientMockRecorder) Execute(ctx, in any, opts ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockCommandServiceClient)(nil).Execute), varargs...)
}
// MockCommandService_ExecuteClient is a mock of CommandService_ExecuteClient interface.
type MockCommandService_ExecuteClient[Res any] struct {
ctrl *gomock.Controller
recorder *MockCommandService_ExecuteClientMockRecorder[Res]
isgomock struct{}
}
// MockCommandService_ExecuteClientMockRecorder is the mock recorder for MockCommandService_ExecuteClient.
type MockCommandService_ExecuteClientMockRecorder[Res any] struct {
mock *MockCommandService_ExecuteClient[Res]
}
// NewMockCommandService_ExecuteClient creates a new mock instance.
func NewMockCommandService_ExecuteClient[Res any](ctrl *gomock.Controller) *MockCommandService_ExecuteClient[Res] {
mock := &MockCommandService_ExecuteClient[Res]{ctrl: ctrl}
mock.recorder = &MockCommandService_ExecuteClientMockRecorder[Res]{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCommandService_ExecuteClient[Res]) EXPECT() *MockCommandService_ExecuteClientMockRecorder[Res] {
return m.recorder
}
// CloseSend mocks base method.
func (m *MockCommandService_ExecuteClient[Res]) CloseSend() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CloseSend")
ret0, _ := ret[0].(error)
return ret0
}
// CloseSend indicates an expected call of CloseSend.
func (mr *MockCommandService_ExecuteClientMockRecorder[Res]) CloseSend() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockCommandService_ExecuteClient[Res])(nil).CloseSend))
}
// Context mocks base method.
func (m *MockCommandService_ExecuteClient[Res]) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context.
func (mr *MockCommandService_ExecuteClientMockRecorder[Res]) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockCommandService_ExecuteClient[Res])(nil).Context))
}
// Header mocks base method.
func (m *MockCommandService_ExecuteClient[Res]) Header() (metadata.MD, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Header")
ret0, _ := ret[0].(metadata.MD)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Header indicates an expected call of Header.
func (mr *MockCommandService_ExecuteClientMockRecorder[Res]) Header() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockCommandService_ExecuteClient[Res])(nil).Header))
}
// Recv mocks base method.
func (m *MockCommandService_ExecuteClient[Res]) Recv() (*cloudproto1.CommandResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Recv")
ret0, _ := ret[0].(*cloudproto1.CommandResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Recv indicates an expected call of Recv.
func (mr *MockCommandService_ExecuteClientMockRecorder[Res]) Recv() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockCommandService_ExecuteClient[Res])(nil).Recv))
}
// RecvMsg mocks base method.
func (m_2 *MockCommandService_ExecuteClient[Res]) RecvMsg(m any) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// RecvMsg indicates an expected call of RecvMsg.
func (mr *MockCommandService_ExecuteClientMockRecorder[Res]) RecvMsg(m any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockCommandService_ExecuteClient[Res])(nil).RecvMsg), m)
}
// SendMsg mocks base method.
func (m_2 *MockCommandService_ExecuteClient[Res]) SendMsg(m any) error {
m_2.ctrl.T.Helper()
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg.
func (mr *MockCommandService_ExecuteClientMockRecorder[Res]) SendMsg(m any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockCommandService_ExecuteClient[Res])(nil).SendMsg), m)
}
// Trailer mocks base method.
func (m *MockCommandService_ExecuteClient[Res]) Trailer() metadata.MD {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Trailer")
ret0, _ := ret[0].(metadata.MD)
return ret0
}
// Trailer indicates an expected call of Trailer.
func (mr *MockCommandService_ExecuteClientMockRecorder[Res]) Trailer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockCommandService_ExecuteClient[Res])(nil).Trailer))
}