| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | package geth |
| 4 | |
| 5 | import ( |
| 6 | "os" |
| 7 | "testing" |
| 8 | |
| 9 | "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/collecttest" |
| 10 | |
| 11 | "github.com/stretchr/testify/require" |
| 12 | ) |
| 13 | |
| 14 | var ( |
| 15 | dataConfigJSON, _ = os.ReadFile("testdata/config.json") |
| 16 | dataConfigYAML, _ = os.ReadFile("testdata/config.yaml") |
| 17 | ) |
| 18 | |
| 19 | func Test_testDataIsValid(t *testing.T) { |
| 20 | for name, data := range map[string][]byte{ |
| 21 | "dataConfigJSON": dataConfigJSON, |
| 22 | "dataConfigYAML": dataConfigYAML, |
| 23 | } { |
| 24 | require.NotNil(t, data, name) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | func TestCollector_ConfigurationSerialize(t *testing.T) { |
| 29 | collecttest.TestConfigurationSerialize(t, &Collector{}, dataConfigJSON, dataConfigYAML) |
| 30 | } |