-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmocks_internal_test.go
More file actions
145 lines (122 loc) · 4.3 KB
/
Copy pathmocks_internal_test.go
File metadata and controls
145 lines (122 loc) · 4.3 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/v-byte-cpu/coredns-https (interfaces: dnsClient,httpRequestDoer)
//
// Generated by this command:
//
// mockgen -destination mocks_internal_test.go -package https -typed . dnsClient,httpRequestDoer
//
// Package https is a generated GoMock package.
package https
import (
context "context"
http "net/http"
reflect "reflect"
dns "github.com/miekg/dns"
gomock "go.uber.org/mock/gomock"
)
// MockdnsClient is a mock of dnsClient interface.
type MockdnsClient struct {
ctrl *gomock.Controller
recorder *MockdnsClientMockRecorder
isgomock struct{}
}
// MockdnsClientMockRecorder is the mock recorder for MockdnsClient.
type MockdnsClientMockRecorder struct {
mock *MockdnsClient
}
// NewMockdnsClient creates a new mock instance.
func NewMockdnsClient(ctrl *gomock.Controller) *MockdnsClient {
mock := &MockdnsClient{ctrl: ctrl}
mock.recorder = &MockdnsClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockdnsClient) EXPECT() *MockdnsClientMockRecorder {
return m.recorder
}
// Query mocks base method.
func (m *MockdnsClient) Query(ctx context.Context, dnsreq []byte) (*dns.Msg, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Query", ctx, dnsreq)
ret0, _ := ret[0].(*dns.Msg)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Query indicates an expected call of Query.
func (mr *MockdnsClientMockRecorder) Query(ctx, dnsreq any) *MockdnsClientQueryCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockdnsClient)(nil).Query), ctx, dnsreq)
return &MockdnsClientQueryCall{Call: call}
}
// MockdnsClientQueryCall wrap *gomock.Call
type MockdnsClientQueryCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockdnsClientQueryCall) Return(result *dns.Msg, err error) *MockdnsClientQueryCall {
c.Call = c.Call.Return(result, err)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockdnsClientQueryCall) Do(f func(context.Context, []byte) (*dns.Msg, error)) *MockdnsClientQueryCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockdnsClientQueryCall) DoAndReturn(f func(context.Context, []byte) (*dns.Msg, error)) *MockdnsClientQueryCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockhttpRequestDoer is a mock of httpRequestDoer interface.
type MockhttpRequestDoer struct {
ctrl *gomock.Controller
recorder *MockhttpRequestDoerMockRecorder
isgomock struct{}
}
// MockhttpRequestDoerMockRecorder is the mock recorder for MockhttpRequestDoer.
type MockhttpRequestDoerMockRecorder struct {
mock *MockhttpRequestDoer
}
// NewMockhttpRequestDoer creates a new mock instance.
func NewMockhttpRequestDoer(ctrl *gomock.Controller) *MockhttpRequestDoer {
mock := &MockhttpRequestDoer{ctrl: ctrl}
mock.recorder = &MockhttpRequestDoerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockhttpRequestDoer) EXPECT() *MockhttpRequestDoerMockRecorder {
return m.recorder
}
// Do mocks base method.
func (m *MockhttpRequestDoer) Do(req *http.Request) (*http.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Do", req)
ret0, _ := ret[0].(*http.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Do indicates an expected call of Do.
func (mr *MockhttpRequestDoerMockRecorder) Do(req any) *MockhttpRequestDoerDoCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockhttpRequestDoer)(nil).Do), req)
return &MockhttpRequestDoerDoCall{Call: call}
}
// MockhttpRequestDoerDoCall wrap *gomock.Call
type MockhttpRequestDoerDoCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockhttpRequestDoerDoCall) Return(arg0 *http.Response, arg1 error) *MockhttpRequestDoerDoCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockhttpRequestDoerDoCall) Do(f func(*http.Request) (*http.Response, error)) *MockhttpRequestDoerDoCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockhttpRequestDoerDoCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockhttpRequestDoerDoCall {
c.Call = c.Call.DoAndReturn(f)
return c
}