open-vault/command/command_test.go
2015-03-31 19:21:02 -07:00

22 lines
366 B
Go

package command
import (
"testing"
"github.com/hashicorp/vault/api"
)
const FixturePath = "./test-fixtures"
func testClient(t *testing.T, addr string, token string) *api.Client {
config := api.DefaultConfig()
config.Address = addr
client, err := api.NewClient(config)
if err != nil {
t.Fatalf("err: %s", err)
}
client.SetToken(token)
return client
}