open-vault/command/config_test.go

22 lines
347 B
Go
Raw Normal View History

2015-03-30 17:25:24 +00:00
package command
import (
"path/filepath"
"reflect"
"testing"
)
func TestLoadConfig(t *testing.T) {
config, err := LoadConfig(filepath.Join(FixturePath, "config.hcl"))
if err != nil {
t.Fatalf("err: %s", err)
}
expected := &Config{
TokenHelper: "foo",
}
if !reflect.DeepEqual(expected, config) {
t.Fatalf("bad: %#v", config)
}
}