mirror of
https://github.com/luxfi/vm.git
synced 2026-10-30 15:13:40 +00:00
Six packages would not build, each from a migration that stopped one step short, and a package that does not compile reports nothing at all. The generated mocks had fallen behind their interfaces: Manager kept four of its eight methods, Server was missing SetRootInfoProvider, and there was no Factory mock under the name the tests used. All three are regenerated, and each package now carries the go:generate line that produces them, so a method added to an interface is a regeneration away rather than a puzzle in another package's tests. The interfaces had also taken a context that the expectations had not, so forty-six of them name it now. Aliases and the level test followed their types: the standalone atomic package rather than the compatibility re-export, and log's own Level constants beside the field that holds one. One table field was renamed in every place but the line that read it. Two services lost a behaviour along the way. Registration aliases every VM to its own id, and both GetVMs and LoadVMs handed that back as an alias of itself, which the tests had said all along they should not; and both read their context from a request the tests passed as nil, which segfaulted before a single expectation could run. chains/atomic still fails, deliberately: its fixture asserts a big-endian wire layout "so any on-disk record from the legacy build still parses", and luxfi/util's packer moved to little-endian on purpose. Which side gives is a question about records already on disk, not about this test. Co-authored-by: Hanzo Dev <[email protected]>
57 lines
1.4 KiB
Go
57 lines
1.4 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/luxfi/vm/manager (interfaces: Factory)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package=managermock -destination=managermock/factory.go -mock_names=Factory=Factory . Factory
|
|
//
|
|
|
|
// Package managermock is a generated GoMock package.
|
|
package managermock
|
|
|
|
import (
|
|
reflect "reflect"
|
|
|
|
log "github.com/luxfi/log"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// Factory is a mock of Factory interface.
|
|
type Factory struct {
|
|
ctrl *gomock.Controller
|
|
recorder *FactoryMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// FactoryMockRecorder is the mock recorder for Factory.
|
|
type FactoryMockRecorder struct {
|
|
mock *Factory
|
|
}
|
|
|
|
// NewFactory creates a new mock instance.
|
|
func NewFactory(ctrl *gomock.Controller) *Factory {
|
|
mock := &Factory{ctrl: ctrl}
|
|
mock.recorder = &FactoryMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *Factory) EXPECT() *FactoryMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// New mocks base method.
|
|
func (m *Factory) New(arg0 log.Logger) (any, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "New", arg0)
|
|
ret0, _ := ret[0].(any)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// New indicates an expected call of New.
|
|
func (mr *FactoryMockRecorder) New(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*Factory)(nil).New), arg0)
|
|
}
|