mirror of
https://github.com/luxfi/netrunner.git
synced 2026-10-30 15:24:46 +00:00
- Enhance genesis.go with LoadCanonicalGenesis for mainnet/testnet - Add LoadGenesisForNetwork to load from external paths - Improve snapshot.go with better incremental backup support - Fix network ID handling in genesis_config.go (use constants.MainnetID not ChainID) - Update API client interfaces for better type safety - Fix server network handling for proper genesis selection - Update dependencies to latest versions
132 lines
3.5 KiB
Go
132 lines
3.5 KiB
Go
// Code generated by mockery v2.23.1. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
apihealth "github.com/luxfi/api/health"
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
rpc "github.com/luxfi/rpc"
|
|
)
|
|
|
|
// Client is an autogenerated mock type for the Client type
|
|
type Client struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Health provides a mock function with given fields: ctx, tags, options
|
|
func (_m *Client) Health(ctx context.Context, tags []string, options ...rpc.Option) (*apihealth.APIReply, error) {
|
|
_va := make([]interface{}, len(options))
|
|
for _i := range options {
|
|
_va[_i] = options[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, tags)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *apihealth.APIReply
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, ...rpc.Option) (*apihealth.APIReply, error)); ok {
|
|
return rf(ctx, tags, options...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, ...rpc.Option) *apihealth.APIReply); ok {
|
|
r0 = rf(ctx, tags, options...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*apihealth.APIReply)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string, ...rpc.Option) error); ok {
|
|
r1 = rf(ctx, tags, options...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Liveness provides a mock function with given fields: ctx, tags, options
|
|
func (_m *Client) Liveness(ctx context.Context, tags []string, options ...rpc.Option) (*apihealth.APIReply, error) {
|
|
_va := make([]interface{}, len(options))
|
|
for _i := range options {
|
|
_va[_i] = options[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, tags)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *apihealth.APIReply
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, ...rpc.Option) (*apihealth.APIReply, error)); ok {
|
|
return rf(ctx, tags, options...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, ...rpc.Option) *apihealth.APIReply); ok {
|
|
r0 = rf(ctx, tags, options...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*apihealth.APIReply)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string, ...rpc.Option) error); ok {
|
|
r1 = rf(ctx, tags, options...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Readiness provides a mock function with given fields: ctx, tags, options
|
|
func (_m *Client) Readiness(ctx context.Context, tags []string, options ...rpc.Option) (*apihealth.APIReply, error) {
|
|
_va := make([]interface{}, len(options))
|
|
for _i := range options {
|
|
_va[_i] = options[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, tags)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *apihealth.APIReply
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, ...rpc.Option) (*apihealth.APIReply, error)); ok {
|
|
return rf(ctx, tags, options...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, ...rpc.Option) *apihealth.APIReply); ok {
|
|
r0 = rf(ctx, tags, options...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*apihealth.APIReply)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string, ...rpc.Option) error); ok {
|
|
r1 = rf(ctx, tags, options...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
type mockConstructorTestingTNewClient interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
func NewClient(t mockConstructorTestingTNewClient) *Client {
|
|
mock := &Client{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|