MCPcopy Index your code
hub / github.com/getsops/sops / TestMasterKey_NeedsRotation

Function TestMasterKey_NeedsRotation

pgp/keysource_test.go:533–539  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

531}
532
533func TestMasterKey_NeedsRotation(t *testing.T) {
534 key := NewMasterKeyFromFingerprint("")
535 assert.False(t, key.NeedsRotation())
536
537 key.CreationDate = key.CreationDate.Add(-(pgpTTL + time.Second))
538 assert.True(t, key.NeedsRotation())
539}
540
541func TestMasterKey_ToString(t *testing.T) {
542 key := NewMasterKeyFromFingerprint(mockFingerprint)

Callers

nothing calls this directly

Calls 2

NeedsRotationMethod · 0.65

Tested by

no test coverage detected