command: unit tests pass
This commit is contained in:
parent
e9a3a34c27
commit
db65fd7b95
|
@ -32,6 +32,10 @@ func TestBackend_basic(t *testing.T) {
|
|||
}
|
||||
|
||||
func testStartConsulServer(t *testing.T) (map[string]interface{}, *os.Process) {
|
||||
if _, err := exec.LookPath("consul"); err != nil {
|
||||
t.Skipf("consul not found: %s", err)
|
||||
}
|
||||
|
||||
td, err := ioutil.TempDir("", "vault")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
|
|
|
@ -9,9 +9,10 @@ import (
|
|||
)
|
||||
|
||||
func TestMounts(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 := &MountsCommand{
|
||||
|
|
|
@ -9,9 +9,10 @@ import (
|
|||
)
|
||||
|
||||
func TestRead(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 := &ReadCommand{
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue