Skip to content

Commit

Permalink
refactor(integration_tests): Re-enable compression and resolve lint w…
Browse files Browse the repository at this point in the history
…arnings
  • Loading branch information
lubux committed Nov 22, 2023
1 parent 49087ba commit 3d55a7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion openpgp/integration_tests/end_to_end_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func encDecTest(t *testing.T, from testVector, testVectors []testVector) {
"Message signed by wrong key id, got: %v, want: %v",
*md.SignedBy, expectedKeyID)
}
if signKey.PublicKey.Version == 6 && bytes.Compare(md.SignedByFingerprint, expectedFingerprint) != 0 {
if signKey.PublicKey.Version == 6 && !bytes.Equal(md.SignedByFingerprint, expectedFingerprint) {
t.Fatalf(
"Message signed by wrong key id, got: %x, want: %x",
md.SignedByFingerprint, expectedFingerprint)
Expand Down
6 changes: 3 additions & 3 deletions openpgp/integration_tests/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ func randConfig() *packet.Config {

compAlgos := []packet.CompressionAlgo{
packet.CompressionNone,
//packet.CompressionZIP,
//packet.CompressionZLIB,
packet.CompressionZIP,
packet.CompressionZLIB,
}
compAlgo := compAlgos[mathrand.Intn(len(compAlgos))]

Expand Down Expand Up @@ -265,7 +265,7 @@ func randConfig() *packet.Config {
}

level := mathrand.Intn(11) - 1
compConf := &packet.CompressionConfig{level}
compConf := &packet.CompressionConfig{Level: level}

var v6 bool
if mathrand.Int()%2 == 0 {
Expand Down
4 changes: 2 additions & 2 deletions openpgp/integration_tests/v2/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ func randConfig() *packet.Config {

compAlgos := []packet.CompressionAlgo{
packet.CompressionNone,
//packet.CompressionZIP,
//packet.CompressionZLIB,
packet.CompressionZIP,
packet.CompressionZLIB,
}
compAlgo := compAlgos[mathrand.Intn(len(compAlgos))]

Expand Down

0 comments on commit 3d55a7e

Please sign in to comment.