MCPcopy Index your code
hub / github.com/netdata/netdata / TestCmdAdd_InvalidJobName

Function TestCmdAdd_InvalidJobName

src/go/plugin/framework/dyncfg/handler_test.go:506–518  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

504}
505
506func TestCmdAdd_InvalidJobName(t *testing.T) {
507 cb := &mockCallbacks{}
508 h := newTestHandler(cb)
509
510 cb.extractKeyFn = func(fn Function) (string, string, bool) {
511 return "bad.name", "bad.name", true
512 }
513
514 fn := newTestFn("test:bad.name", "add", "bad.name", []byte(`{}`))
515 h.CmdAdd(fn)
516
517 assert.Equal(t, 0, h.exposed.Count())
518}
519
520func TestCmdAdd_ParseError(t *testing.T) {
521 cb := &mockCallbacks{}

Callers

nothing calls this directly

Calls 5

newTestHandlerFunction · 0.85
newTestFnFunction · 0.85
CmdAddMethod · 0.80
EqualMethod · 0.80
CountMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…