MCPcopy
hub / github.com/micro/go-micro / TestWatcher

Function TestWatcher

registry/mdns_test.go:211–363  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

209}
210
211func TestWatcher(t *testing.T) {
212 if travis := os.Getenv("TRAVIS"); travis == "true" {
213 t.Skip()
214 }
215
216 testData := []*Service{
217 {
218 Name: "test1",
219 Version: "1.0.1",
220 Nodes: []*Node{
221 {
222 Id: "test1-1",
223 Address: "10.0.0.1:10001",
224 Metadata: map[string]string{
225 "foo": "bar",
226 },
227 },
228 },
229 },
230 {
231 Name: "test2",
232 Version: "1.0.2",
233 Nodes: []*Node{
234 {
235 Id: "test2-1",
236 Address: "10.0.0.2:10002",
237 Metadata: map[string]string{
238 "foo2": "bar2",
239 },
240 },
241 },
242 },
243 {
244 Name: "test3",
245 Version: "1.0.3",
246 Nodes: []*Node{
247 {
248 Id: "test3-1",
249 Address: "10.0.0.3:10003",
250 Metadata: map[string]string{
251 "foo3": "bar3",
252 },
253 },
254 },
255 },
256 {
257 Name: "test4",
258 Version: "1.0.4",
259 Nodes: []*Node{
260 {
261 Id: "test4-1",
262 Address: "[::]:10004",
263 Metadata: map[string]string{
264 "foo4": "bar4",
265 },
266 },
267 },
268 },

Callers

nothing calls this directly

Calls 9

NewMDNSRegistryFunction · 0.85
FatalMethod · 0.80
TimeoutFunction · 0.70
WatchMethod · 0.65
StopMethod · 0.65
RegisterMethod · 0.65
NextMethod · 0.65
DeregisterMethod · 0.65
FatalfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…