mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
api: re-use proper token constant
This commit is contained in:
@@ -4,13 +4,15 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
vaultHttp "github.com/hashicorp/vault/http"
|
||||
)
|
||||
|
||||
func TestClientToken(t *testing.T) {
|
||||
tokenValue := "foo"
|
||||
handler := func(w http.ResponseWriter, req *http.Request) {
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: TokenCookieName,
|
||||
Name: vaultHttp.AuthCookieName,
|
||||
Value: tokenValue,
|
||||
Expires: time.Now().Add(time.Hour),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user