open-vault/command/config_test.go
2015-03-30 10:25:24 -07:00

22 lines
347 B
Go

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)
}
}