diff options
Diffstat (limited to '')
-rw-r--r-- | src/go/collectors/go.d.plugin/modules/geth/geth_test.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/geth/geth_test.go b/src/go/collectors/go.d.plugin/modules/geth/geth_test.go new file mode 100644 index 000000000..68c38385e --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/geth/geth_test.go @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package geth + +import ( + "os" + "testing" + + "github.com/netdata/netdata/go/go.d.plugin/agent/module" + + "github.com/stretchr/testify/require" +) + +var ( + dataConfigJSON, _ = os.ReadFile("testdata/config.json") + dataConfigYAML, _ = os.ReadFile("testdata/config.yaml") +) + +func Test_testDataIsValid(t *testing.T) { + for name, data := range map[string][]byte{ + "dataConfigJSON": dataConfigJSON, + "dataConfigYAML": dataConfigYAML, + } { + require.NotNil(t, data, name) + } +} + +func TestGeth_ConfigurationSerialize(t *testing.T) { + module.TestConfigurationSerialize(t, &Geth{}, dataConfigJSON, dataConfigYAML) +} |