(t *testing.T)
| 154 | } |
| 155 | |
| 156 | func TestGnuPGHome_ApplyToMasterKey(t *testing.T) { |
| 157 | gnuPGHome, err := NewGnuPGHome() |
| 158 | assert.NoError(t, err) |
| 159 | t.Cleanup(func() { |
| 160 | _ = os.RemoveAll(gnuPGHome.String()) |
| 161 | }) |
| 162 | |
| 163 | key := NewMasterKeyFromFingerprint(mockFingerprint) |
| 164 | gnuPGHome.ApplyToMasterKey(key) |
| 165 | assert.Equal(t, gnuPGHome.String(), key.gnuPGHomeDir) |
| 166 | |
| 167 | gnuPGHome = "/non/existing/absolute/path/fails/validate" |
| 168 | gnuPGHome.ApplyToMasterKey(key) |
| 169 | assert.NotEqual(t, gnuPGHome.String(), key.gnuPGHomeDir) |
| 170 | } |
| 171 | |
| 172 | func TestDisableOpenPGP_ApplyToMasterKey(t *testing.T) { |
| 173 | key := NewMasterKeyFromFingerprint(mockFingerprint) |
nothing calls this directly
no test coverage detected