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

Function TestMasterKey_ToMap

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

Source from the content-addressed store, hash-verified

544}
545
546func TestMasterKey_ToMap(t *testing.T) {
547 key := NewMasterKeyFromFingerprint(mockFingerprint)
548 key.EncryptedKey = "data"
549 assert.Equal(t, map[string]interface{}{
550 "fp": mockFingerprint,
551 "created_at": key.CreationDate.UTC().Format(time.RFC3339),
552 "enc": key.EncryptedKey,
553 }, key.ToMap())
554}
555
556func TestMasterKey_retrievePubKey(t *testing.T) {
557 t.Run("existing fingerprint", func(t *testing.T) {

Callers

nothing calls this directly

Calls 3

FormatMethod · 0.80
ToMapMethod · 0.65

Tested by

no test coverage detected