open-vault/http/sys_lease_test.go
2015-03-31 19:23:32 -07:00

28 lines
624 B
Go

package http
import (
"testing"
"github.com/hashicorp/vault/vault"
)
func TestSysRevoke(t *testing.T) {
core, _, token := vault.TestCoreUnsealed(t)
ln, addr := TestServer(t, core)
defer ln.Close()
TestServerAuth(t, addr, token)
resp := testHttpPut(t, addr+"/v1/sys/revoke/secret/foo/1234", nil)
testResponseStatus(t, resp, 204)
}
func TestSysRevokePrefix(t *testing.T) {
core, _, token := vault.TestCoreUnsealed(t)
ln, addr := TestServer(t, core)
defer ln.Close()
TestServerAuth(t, addr, token)
resp := testHttpPut(t, addr+"/v1/sys/revoke-prefix/secret/foo/1234", nil)
testResponseStatus(t, resp, 204)
}