MCPcopy
hub / github.com/getsops/sops / TestMasterKey_NeedsRotation

Function TestMasterKey_NeedsRotation

azkv/keysource_test.go:183–189  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

181}
182
183func TestMasterKey_NeedsRotation(t *testing.T) {
184 key := newMasterKey("", "", "")
185 assert.False(t, key.NeedsRotation())
186
187 key.CreationDate = key.CreationDate.Add(-(azkvTTL + time.Second))
188 assert.True(t, key.NeedsRotation())
189}
190
191func TestMasterKey_ToString(t *testing.T) {
192 key := newMasterKey("https://test.vault.azure.net", "key-name", "key-version")

Callers

nothing calls this directly

Calls 2

newMasterKeyFunction · 0.85
NeedsRotationMethod · 0.65

Tested by

no test coverage detected