mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Fixes incorrect checks for errors in several tests (#7392)
* fixes TestServer_ListAssignments_Pagination_InputOutOfRange * fixes TestServer_ListValidatorBalances_PaginationOutOfRange * fix TestServer_ListAttestations_Genesis * remove redundant TestServer_GetValidatorParticipation_DoesntExist and TestGetDuties_NextEpoch_CantFindValidatorIdx * Merge branch 'master' into fix-invalid-errcheck-tests * remove unnecessary import * fix TestStore_OnAttestation * fix TestStore_OnAttestationUsingCheckptCache * fix TestVerifyBlkDescendant * fix pagination tests * fix account v2 tests * fix account v2 tests (remote) * fix TestServer_JWTInterceptor_BadToken * Merge refs/heads/master into fix-invalid-errcheck-tests
This commit is contained in:
@@ -110,8 +110,8 @@ func TestDecrypt(t *testing.T) {
|
||||
|
||||
// We capture the results of stdout to check the public key and private keys
|
||||
// were both printed to stdout.
|
||||
assert.Equal(t, strings.Contains(stringOutput, keystore.Pubkey), true)
|
||||
assert.Equal(t, strings.Contains(stringOutput, fmt.Sprintf("%#x", privKey.Marshal())), true)
|
||||
assert.Equal(t, true, strings.Contains(stringOutput, keystore.Pubkey))
|
||||
assert.Equal(t, true, strings.Contains(stringOutput, fmt.Sprintf("%#x", privKey.Marshal())))
|
||||
}
|
||||
|
||||
func TestEncrypt(t *testing.T) {
|
||||
@@ -143,9 +143,6 @@ func TestEncrypt(t *testing.T) {
|
||||
stringOutput := string(out)
|
||||
|
||||
// We capture the results of stdout to check the public key was printed to stdout.
|
||||
assert.Equal(
|
||||
t,
|
||||
strings.Contains(stringOutput, fmt.Sprintf("%x", privKey.PublicKey().Marshal())),
|
||||
true,
|
||||
)
|
||||
res := strings.Contains(stringOutput, fmt.Sprintf("%x", privKey.PublicKey().Marshal()))
|
||||
assert.Equal(t, true, res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user