1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00
vsphere-influxdb-go/vendor/github.com/influxdata/influxdb/services/meta/config_test.go

27 lines
504 B
Go
Raw Normal View History

2017-10-25 22:52:40 +02:00
package meta_test
import (
"testing"
"github.com/BurntSushi/toml"
"github.com/influxdata/influxdb/services/meta"
)
func TestConfig_Parse(t *testing.T) {
// Parse configuration.
var c meta.Config
if _, err := toml.Decode(`
dir = "/tmp/foo"
logging-enabled = false
`, &c); err != nil {
t.Fatal(err)
}
// Validate configuration.
if c.Dir != "/tmp/foo" {
t.Fatalf("unexpected dir: %s", c.Dir)
} else if c.LoggingEnabled {
t.Fatalf("unexpected logging enabled: %v", c.LoggingEnabled)
}
}