MCPcopy
hub / github.com/netdata/netdata / TestDimension

Function TestDimension

src/go/pkg/netdataapi/api_test.go:50–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func TestDimension(t *testing.T) {
51 w := &bytes.Buffer{}
52 api := New(w)
53
54 opts := DimensionOpts{
55 ID: "user",
56 Name: "user",
57 Algorithm: "absolute",
58 Multiplier: 1,
59 Divisor: 1,
60 Options: "",
61 }
62
63 api.DIMENSION(opts)
64
65 expected := "DIMENSION 'user' 'user' 'absolute' '1' '1' ''\n"
66
67 require.Equal(t, expected, w.String())
68}
69
70func TestCLABEL(t *testing.T) {
71 w := &bytes.Buffer{}

Callers

nothing calls this directly

Calls 4

DIMENSIONMethod · 0.80
EqualMethod · 0.80
NewFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…