mirror of
https://github.com/nikdoof/vsphere-influxdb-go.git
synced 2025-12-20 05:59:21 +00:00
add vendoring with go dep
This commit is contained in:
32
vendor/github.com/influxdata/influxdb/services/collectd/config_test.go
generated
vendored
Normal file
32
vendor/github.com/influxdata/influxdb/services/collectd/config_test.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
package collectd_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/influxdata/influxdb/services/collectd"
|
||||
)
|
||||
|
||||
func TestConfig_Parse(t *testing.T) {
|
||||
// Parse configuration.
|
||||
var c collectd.Config
|
||||
if _, err := toml.Decode(`
|
||||
enabled = true
|
||||
bind-address = ":9000"
|
||||
database = "xxx"
|
||||
typesdb = "yyy"
|
||||
`, &c); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Validate configuration.
|
||||
if c.Enabled != true {
|
||||
t.Fatalf("unexpected enabled: %v", c.Enabled)
|
||||
} else if c.BindAddress != ":9000" {
|
||||
t.Fatalf("unexpected bind address: %s", c.BindAddress)
|
||||
} else if c.Database != "xxx" {
|
||||
t.Fatalf("unexpected database: %s", c.Database)
|
||||
} else if c.TypesDB != "yyy" {
|
||||
t.Fatalf("unexpected types db: %s", c.TypesDB)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user