Code maintenance: Unix abstraction interface
- Used for creating the tun device if it does not exist - Mocks generated for testing
This commit is contained in:
61
internal/unix/mock_unix/unix.go
Normal file
61
internal/unix/mock_unix/unix.go
Normal file
@@ -0,0 +1,61 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: github.com/qdm12/gluetun/internal/unix (interfaces: Unix)
|
||||
|
||||
// Package mock_unix is a generated GoMock package.
|
||||
package mock_unix
|
||||
|
||||
import (
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockUnix is a mock of Unix interface
|
||||
type MockUnix struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockUnixMockRecorder
|
||||
}
|
||||
|
||||
// MockUnixMockRecorder is the mock recorder for MockUnix
|
||||
type MockUnixMockRecorder struct {
|
||||
mock *MockUnix
|
||||
}
|
||||
|
||||
// NewMockUnix creates a new mock instance
|
||||
func NewMockUnix(ctrl *gomock.Controller) *MockUnix {
|
||||
mock := &MockUnix{ctrl: ctrl}
|
||||
mock.recorder = &MockUnixMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use
|
||||
func (m *MockUnix) EXPECT() *MockUnixMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// Mkdev mocks base method
|
||||
func (m *MockUnix) Mkdev(arg0, arg1 uint32) uint64 {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Mkdev", arg0, arg1)
|
||||
ret0, _ := ret[0].(uint64)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Mkdev indicates an expected call of Mkdev
|
||||
func (mr *MockUnixMockRecorder) Mkdev(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Mkdev", reflect.TypeOf((*MockUnix)(nil).Mkdev), arg0, arg1)
|
||||
}
|
||||
|
||||
// Mknod mocks base method
|
||||
func (m *MockUnix) Mknod(arg0 string, arg1 uint32, arg2 int) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Mknod", arg0, arg1, arg2)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Mknod indicates an expected call of Mknod
|
||||
func (mr *MockUnixMockRecorder) Mknod(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Mknod", reflect.TypeOf((*MockUnix)(nil).Mknod), arg0, arg1, arg2)
|
||||
}
|
||||
Reference in New Issue
Block a user