Skip to content

Commit

Permalink
Fix gpg test (#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniilKurlovich committed May 28, 2021
1 parent c51d323 commit 2611d11
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions internal/crypto_comp_test.go
Expand Up @@ -39,8 +39,6 @@ func init() {
// decompression to check integrity. Test will leave gpg key
// "walg-server-test" installed.
func TestDecryptWALElzo(t *testing.T) {
t.Skip("This test has gpg side effects and was skipped. If you want to run it - comment skip line in crypto_compt_test.go")

crypter := openpgp.CrypterFromKey(waleGpgKey, noPassphrase)
f, err := os.Open(waleWALfilename)
assert.NoError(t, err)
Expand Down Expand Up @@ -91,7 +89,6 @@ func installTestKeyToExternalGPG(t *testing.T) *exec.Cmd {

// Test will leave gpg key "walg-server-test" installed.
func TestOpenGPGandExternalGPGCompatibility(t *testing.T) {
t.Skip("This test has gpg side effects and was skipped. If you want to run it - comment skip line in crypto_compt_test.go")

installTestKeyToExternalGPG(t)

Expand Down Expand Up @@ -124,8 +121,7 @@ type ExternalGPGCrypter struct {
}

func (c *ExternalGPGCrypter) Encrypt(reader io.Reader) ([]byte, error) {
cmd := exec.Command("gpg", "-e", "-z", "0", "-r", gpgKeyID)

cmd := exec.Command("gpg", "-e", "-z", "0", "-r", gpgKeyID, "--trust-model", "always")
cmd.Stdin = reader

return cmd.Output()
Expand Down

0 comments on commit 2611d11

Please sign in to comment.