mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Use time.Now rather than using time as a struct
This commit is contained in:
@@ -908,6 +908,7 @@ func TestExpiration_renewAuthEntry(t *testing.T) {
|
||||
|
||||
func TestExpiration_PersistLoadDelete(t *testing.T) {
|
||||
exp := mockExpiration(t)
|
||||
lastTime := time.Now()
|
||||
le := &leaseEntry{
|
||||
LeaseID: "foo/bar/1234",
|
||||
Path: "foo/bar",
|
||||
@@ -919,9 +920,9 @@ func TestExpiration_PersistLoadDelete(t *testing.T) {
|
||||
TTL: time.Minute,
|
||||
},
|
||||
},
|
||||
IssueTime: time.Now(),
|
||||
ExpireTime: time.Now(),
|
||||
LastRenewalTime: time.Time{},
|
||||
IssueTime: lastTime,
|
||||
ExpireTime: lastTime,
|
||||
LastRenewalTime: lastTime,
|
||||
}
|
||||
if err := exp.persistEntry(le); err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user