open-vault/http/help_test.go

24 lines
471 B
Go
Raw Normal View History

2015-04-03 05:21:33 +00:00
package http
import (
"testing"
"github.com/hashicorp/vault/vault"
)
func TestHelp(t *testing.T) {
core, _, token := vault.TestCoreUnsealed(t)
ln, addr := TestServer(t, core)
defer ln.Close()
TestServerAuth(t, addr, token)
2015-08-22 00:36:19 +00:00
resp := testHttpGet(t, token, addr+"/v1/sys/mounts?help=1")
2015-04-03 05:21:33 +00:00
var actual map[string]interface{}
testResponseStatus(t, resp, 200)
testResponseBody(t, resp, &actual)
if _, ok := actual["help"]; !ok {
t.Fatalf("bad: %#v", actual)
}
}