Files
CrimsonandGitHub 4ae387a5d1 test: setup go SDK generation for use in e2e tests and start running CI steps with nix (#377)
* Use formance-sdk-go/v3 to in connector uninstall e2e test

* Compile API docs from openapi spec

* Generate go SDK locally for use in integration tests

* Get rid of unnecessary redirect in e2e tests now that SDK is generated

* Omit generated SDK code from codecoverage checks

* Add flake and envrc for nix

* Run Dirty and Tests CI steps with nix

* Run pre-commit using nix

* Remove duplicated steps from Earthfile

* Fixes for linter

* Add go generate to Justfile pre-commit

* Still run Deploy on ubuntu-latest

* Address coderabbit feedback
2025-03-31 10:30:34 +02:00

224 lines
7.6 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: schedule_client.go
//
// Generated by this command:
//
// mockgen -source schedule_client.go -destination schedule_client_generated.go -package activities . ScheduleClient ScheduleHandle
//
// Package activities is a generated GoMock package.
package activities
import (
context "context"
reflect "reflect"
client "go.temporal.io/sdk/client"
gomock "go.uber.org/mock/gomock"
)
// MockScheduleClient is a mock of ScheduleClient interface.
type MockScheduleClient struct {
ctrl *gomock.Controller
recorder *MockScheduleClientMockRecorder
isgomock struct{}
}
// MockScheduleClientMockRecorder is the mock recorder for MockScheduleClient.
type MockScheduleClientMockRecorder struct {
mock *MockScheduleClient
}
// NewMockScheduleClient creates a new mock instance.
func NewMockScheduleClient(ctrl *gomock.Controller) *MockScheduleClient {
mock := &MockScheduleClient{ctrl: ctrl}
mock.recorder = &MockScheduleClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockScheduleClient) EXPECT() *MockScheduleClientMockRecorder {
return m.recorder
}
// Create mocks base method.
func (m *MockScheduleClient) Create(ctx context.Context, options client.ScheduleOptions) (client.ScheduleHandle, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", ctx, options)
ret0, _ := ret[0].(client.ScheduleHandle)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Create indicates an expected call of Create.
func (mr *MockScheduleClientMockRecorder) Create(ctx, options any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockScheduleClient)(nil).Create), ctx, options)
}
// GetHandle mocks base method.
func (m *MockScheduleClient) GetHandle(ctx context.Context, scheduleID string) client.ScheduleHandle {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetHandle", ctx, scheduleID)
ret0, _ := ret[0].(client.ScheduleHandle)
return ret0
}
// GetHandle indicates an expected call of GetHandle.
func (mr *MockScheduleClientMockRecorder) GetHandle(ctx, scheduleID any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHandle", reflect.TypeOf((*MockScheduleClient)(nil).GetHandle), ctx, scheduleID)
}
// List mocks base method.
func (m *MockScheduleClient) List(ctx context.Context, options client.ScheduleListOptions) (client.ScheduleListIterator, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", ctx, options)
ret0, _ := ret[0].(client.ScheduleListIterator)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// List indicates an expected call of List.
func (mr *MockScheduleClientMockRecorder) List(ctx, options any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockScheduleClient)(nil).List), ctx, options)
}
// MockScheduleHandle is a mock of ScheduleHandle interface.
type MockScheduleHandle struct {
ctrl *gomock.Controller
recorder *MockScheduleHandleMockRecorder
isgomock struct{}
}
// MockScheduleHandleMockRecorder is the mock recorder for MockScheduleHandle.
type MockScheduleHandleMockRecorder struct {
mock *MockScheduleHandle
}
// NewMockScheduleHandle creates a new mock instance.
func NewMockScheduleHandle(ctrl *gomock.Controller) *MockScheduleHandle {
mock := &MockScheduleHandle{ctrl: ctrl}
mock.recorder = &MockScheduleHandleMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockScheduleHandle) EXPECT() *MockScheduleHandleMockRecorder {
return m.recorder
}
// Backfill mocks base method.
func (m *MockScheduleHandle) Backfill(ctx context.Context, options client.ScheduleBackfillOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Backfill", ctx, options)
ret0, _ := ret[0].(error)
return ret0
}
// Backfill indicates an expected call of Backfill.
func (mr *MockScheduleHandleMockRecorder) Backfill(ctx, options any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Backfill", reflect.TypeOf((*MockScheduleHandle)(nil).Backfill), ctx, options)
}
// Delete mocks base method.
func (m *MockScheduleHandle) Delete(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockScheduleHandleMockRecorder) Delete(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockScheduleHandle)(nil).Delete), ctx)
}
// Describe mocks base method.
func (m *MockScheduleHandle) Describe(ctx context.Context) (*client.ScheduleDescription, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Describe", ctx)
ret0, _ := ret[0].(*client.ScheduleDescription)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Describe indicates an expected call of Describe.
func (mr *MockScheduleHandleMockRecorder) Describe(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Describe", reflect.TypeOf((*MockScheduleHandle)(nil).Describe), ctx)
}
// GetID mocks base method.
func (m *MockScheduleHandle) GetID() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetID")
ret0, _ := ret[0].(string)
return ret0
}
// GetID indicates an expected call of GetID.
func (mr *MockScheduleHandleMockRecorder) GetID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetID", reflect.TypeOf((*MockScheduleHandle)(nil).GetID))
}
// Pause mocks base method.
func (m *MockScheduleHandle) Pause(ctx context.Context, options client.SchedulePauseOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Pause", ctx, options)
ret0, _ := ret[0].(error)
return ret0
}
// Pause indicates an expected call of Pause.
func (mr *MockScheduleHandleMockRecorder) Pause(ctx, options any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pause", reflect.TypeOf((*MockScheduleHandle)(nil).Pause), ctx, options)
}
// Trigger mocks base method.
func (m *MockScheduleHandle) Trigger(ctx context.Context, options client.ScheduleTriggerOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Trigger", ctx, options)
ret0, _ := ret[0].(error)
return ret0
}
// Trigger indicates an expected call of Trigger.
func (mr *MockScheduleHandleMockRecorder) Trigger(ctx, options any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trigger", reflect.TypeOf((*MockScheduleHandle)(nil).Trigger), ctx, options)
}
// Unpause mocks base method.
func (m *MockScheduleHandle) Unpause(ctx context.Context, options client.ScheduleUnpauseOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Unpause", ctx, options)
ret0, _ := ret[0].(error)
return ret0
}
// Unpause indicates an expected call of Unpause.
func (mr *MockScheduleHandleMockRecorder) Unpause(ctx, options any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unpause", reflect.TypeOf((*MockScheduleHandle)(nil).Unpause), ctx, options)
}
// Update mocks base method.
func (m *MockScheduleHandle) Update(ctx context.Context, options client.ScheduleUpdateOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", ctx, options)
ret0, _ := ret[0].(error)
return ret0
}
// Update indicates an expected call of Update.
func (mr *MockScheduleHandleMockRecorder) Update(ctx, options any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockScheduleHandle)(nil).Update), ctx, options)
}