MCPcopy
hub / github.com/smallstep/cli / withFixedTime

Function withFixedTime

token/provision/provision_test.go:15–22  ·  view source on GitHub ↗
(tok *Token, t time.Time)

Source from the content-addressed store, hash-verified

13)
14
15func withFixedTime(tok *Token, t time.Time) {
16 if tok == nil {
17 return
18 }
19 tok.claims.IssuedAt = jose.NewNumericDate(t)
20 tok.claims.NotBefore = jose.NewNumericDate(t)
21 tok.claims.Expiry = jose.NewNumericDate(t.Add(5 * time.Minute))
22}
23
24func TestNew(t *testing.T) {
25 type args struct {

Callers 1

TestNewFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…