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

Function TestGnuPGHome_ImportFile

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

Source from the content-addressed store, hash-verified

89}
90
91func TestGnuPGHome_ImportFile(t *testing.T) {
92 gnuPGHome, err := NewGnuPGHome()
93 assert.NoError(t, err)
94 t.Cleanup(func() {
95 _ = os.RemoveAll(gnuPGHome.String())
96 })
97
98 assert.NoError(t, gnuPGHome.ImportFile(mockPublicKey))
99 assert.Error(t, gnuPGHome.ImportFile("invalid"))
100}
101
102func TestGnuPGHome_Cleanup(t *testing.T) {
103 gnuPGHome, err := NewGnuPGHome()

Callers

nothing calls this directly

Calls 5

StringMethod · 0.95
ImportFileMethod · 0.95
NewGnuPGHomeFunction · 0.85
CleanupMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected