(t *testing.T)
| 554 | } |
| 555 | |
| 556 | func TestMasterKey_retrievePubKey(t *testing.T) { |
| 557 | t.Run("existing fingerprint", func(t *testing.T) { |
| 558 | key := NewMasterKeyFromFingerprint(mockFingerprint) |
| 559 | PubRing(mockPubRing).ApplyToMasterKey(key) |
| 560 | |
| 561 | got, err := key.retrievePubKey() |
| 562 | assert.NoError(t, err) |
| 563 | assert.NotEmpty(t, got) |
| 564 | }) |
| 565 | |
| 566 | t.Run("non-existing fingerprint", func(t *testing.T) { |
| 567 | key := NewMasterKeyFromFingerprint("invalid") |
| 568 | PubRing(mockPubRing).ApplyToMasterKey(key) |
| 569 | |
| 570 | got, err := key.retrievePubKey() |
| 571 | assert.Error(t, err) |
| 572 | assert.Empty(t, got) |
| 573 | }) |
| 574 | } |
| 575 | |
| 576 | func TestMasterKey_getPubRing(t *testing.T) { |
| 577 | t.Run("default pub ring", func(t *testing.T) { |
nothing calls this directly
no test coverage detected