command: unit tests pass

This commit is contained in:
Mitchell Hashimoto
2015-03-29 16:20:34 -07:00
parent a015c5a4f7
commit 39f2da0fbe
4 changed files with 12 additions and 4 deletions

View File

@@ -10,9 +10,10 @@ import (
)
func TestWrite(t *testing.T) {
core, _ := vault.TestCoreUnsealed(t)
core, _, token := vault.TestCoreUnsealed(t)
ln, addr := http.TestServer(t, core)
defer ln.Close()
http.TestServerAuth(t, addr, token)
ui := new(cli.MockUi)
c := &WriteCommand{
@@ -46,9 +47,10 @@ func TestWrite(t *testing.T) {
}
func TestWrite_arbitrary(t *testing.T) {
core, _ := vault.TestCoreUnsealed(t)
core, _, token := vault.TestCoreUnsealed(t)
ln, addr := http.TestServer(t, core)
defer ln.Close()
http.TestServerAuth(t, addr, token)
stdinR, stdinW := io.Pipe()
ui := new(cli.MockUi)