mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-08 16:24:51 -04:00
Fix up unit tests to expect new values
This commit is contained in:
parent
8a5bf09c49
commit
a80481792e
2 changed files with 5 additions and 5 deletions
|
|
@ -130,13 +130,13 @@ func TestAuthTokenRenew(t *testing.T) {
|
|||
client.SetToken(secret.Auth.ClientToken)
|
||||
|
||||
// Now attempt a renew with the new token
|
||||
secret, err = client.Auth().Token().Renew(secret.Auth.ClientToken, 0)
|
||||
secret, err = client.Auth().Token().Renew(secret.Auth.ClientToken, 3600)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if secret.Auth.LeaseDuration != 3600 {
|
||||
t.Errorf("expected 1h, got %q", secret.Auth.LeaseDuration)
|
||||
t.Errorf("expected 1h, got %v", secret.Auth.LeaseDuration)
|
||||
}
|
||||
|
||||
if secret.Auth.Renewable != true {
|
||||
|
|
@ -144,13 +144,13 @@ func TestAuthTokenRenew(t *testing.T) {
|
|||
}
|
||||
|
||||
// Do the same thing with the self variant
|
||||
secret, err = client.Auth().Token().RenewSelf(0)
|
||||
secret, err = client.Auth().Token().RenewSelf(3600)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if secret.Auth.LeaseDuration != 3600 {
|
||||
t.Errorf("expected 1h, got %q", secret.Auth.LeaseDuration)
|
||||
t.Errorf("expected 1h, got %v", secret.Auth.LeaseDuration)
|
||||
}
|
||||
|
||||
if secret.Auth.Renewable != true {
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ func TestLogical_CreateToken(t *testing.T) {
|
|||
"policies": []interface{}{"root"},
|
||||
"metadata": nil,
|
||||
"lease_duration": float64(0),
|
||||
"renewable": false,
|
||||
"renewable": true,
|
||||
},
|
||||
"warnings": nilWarnings,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue