/
panosClient.go
101 lines (79 loc) · 2.34 KB
/
panosClient.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Code generated by mockery v2.13.1. DO NOT EDIT.
package mocks
import (
time "time"
mock "github.com/stretchr/testify/mock"
)
// PanosClient is an autogenerated mock type for the panosClient type
type PanosClient struct {
mock.Mock
}
// Commit provides a mock function with given fields: cmd, action, extras
func (_m *PanosClient) Commit(cmd interface{}, action string, extras interface{}) (uint, []byte, error) {
ret := _m.Called(cmd, action, extras)
var r0 uint
if rf, ok := ret.Get(0).(func(interface{}, string, interface{}) uint); ok {
r0 = rf(cmd, action, extras)
} else {
r0 = ret.Get(0).(uint)
}
var r1 []byte
if rf, ok := ret.Get(1).(func(interface{}, string, interface{}) []byte); ok {
r1 = rf(cmd, action, extras)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]byte)
}
}
var r2 error
if rf, ok := ret.Get(2).(func(interface{}, string, interface{}) error); ok {
r2 = rf(cmd, action, extras)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// InitializeUsing provides a mock function with given fields: filename, chkenv
func (_m *PanosClient) InitializeUsing(filename string, chkenv bool) error {
ret := _m.Called(filename, chkenv)
var r0 error
if rf, ok := ret.Get(0).(func(string, bool) error); ok {
r0 = rf(filename, chkenv)
} else {
r0 = ret.Error(0)
}
return r0
}
// String provides a mock function with given fields:
func (_m *PanosClient) String() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// WaitForJob provides a mock function with given fields: id, sleep, resp
func (_m *PanosClient) WaitForJob(id uint, sleep time.Duration, resp interface{}) error {
ret := _m.Called(id, sleep, resp)
var r0 error
if rf, ok := ret.Get(0).(func(uint, time.Duration, interface{}) error); ok {
r0 = rf(id, sleep, resp)
} else {
r0 = ret.Error(0)
}
return r0
}
type mockConstructorTestingTNewPanosClient interface {
mock.TestingT
Cleanup(func())
}
// NewPanosClient creates a new instance of PanosClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewPanosClient(t mockConstructorTestingTNewPanosClient) *PanosClient {
mock := &PanosClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}