Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the order of paremeters in require.Equalf() #534

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
func TestNewOstraconNode(t *testing.T) {
config := cfg.ResetTestRootWithChainID("TestNewOstraconNode", "new_ostracon_node")
defer os.RemoveAll(config.RootDir)
require.Equal(t, config.PrivValidatorListenAddr, "")
require.Equal(t, "", config.PrivValidatorListenAddr)
node, err := NewOstraconNode(config, log.TestingLogger())
require.NoError(t, err)
pubKey, err := node.PrivValidator().GetPubKey()
Expand Down
2 changes: 1 addition & 1 deletion rpc/jsonrpc/server/http_json_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func TestRPCNotification(t *testing.T) {
blob, err := ioutil.ReadAll(res.Body)
res.Body.Close()
require.Nil(t, err, "reading from the body should not give back an error")
require.Equal(t, len(blob), 0, "a notification SHOULD NOT be responded to by the server")
require.Equal(t, 0, len(blob), "a notification SHOULD NOT be responded to by the server")
}

func TestRPCNotificationInBatch(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions test/kms/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ func benchmarkGetPubKey(b *testing.B, pv types.PrivValidator) crypto.PubKey {

// evaluate execution results
require.NoError(b, err)
require.Equalf(b, len(pubKey.Bytes()), ed25519.PubKeySize, "PubKey: public key size = %d != %d",
len(pubKey.Bytes()), ed25519.PubKeySize)
require.Equalf(b, ed25519.PubKeySize, len(pubKey.Bytes()), "PubKey: public key size = %d != %d",
ed25519.PubKeySize, len(pubKey.Bytes()))
return pubKey
}

Expand Down Expand Up @@ -120,8 +120,8 @@ func benchmarkSignVote(b *testing.B, pv types.PrivValidator, pubKey crypto.PubKe

// evaluate execution results
require.NoError(b, err)
require.Equalf(b, len(pb.Signature), ed25519.SignatureSize, "SignVote: signature size = %d != %d",
len(pb.Signature), ed25519.SignatureSize)
require.Equalf(b, ed25519.SignatureSize, len(pb.Signature), "SignVote: signature size = %d != %d",
ed25519.SignatureSize, len(pb.Signature))
bytes := types.VoteSignBytes(chainID, pb)
require.Truef(b, pubKey.VerifySignature(bytes, pb.Signature), "SignVote: signature verification")
}
Expand Down Expand Up @@ -155,8 +155,8 @@ func benchmarkSignProposal(b *testing.B, pv types.PrivValidator, pubKey crypto.P

// evaluate execution results
require.NoError(b, err)
require.Equalf(b, len(pb.Signature), ed25519.SignatureSize, "SignProposal: signature size = %d != %d",
len(pb.Signature), ed25519.SignatureSize)
require.Equalf(b, ed25519.SignatureSize, len(pb.Signature), "SignProposal: signature size = %d != %d",
ed25519.SignatureSize, len(pb.Signature))
bytes := types.ProposalSignBytes(chainID, pb)
require.Truef(b, pubKey.VerifySignature(bytes, pb.Signature), "SignProposal: signature verification")
}
Expand Down