Skip to content

Commit

Permalink
rabbit suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianToledano committed Jan 22, 2025
1 parent 5a8b5d8 commit 565ef74
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ issues:
- text: "leading space"
linters:
- nolintlint
- text: "G204:"
linters:
- "gosec"

max-issues-per-linter: 10000
max-same-issues: 10000
Expand Down
8 changes: 7 additions & 1 deletion tests/systemtests/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ func TestAccounts(t *testing.T) {
toAddr := cli.AddKey("account2")
sut.StartChain(t)

cli.RunAndWait("tx", "bank", "send", fromAddr, toAddr, "1000000stake")
rsp := cli.RunAndWait("tx", "bank", "send", fromAddr, toAddr, "1000000stake")
systemtests.RequireTxSuccess(t, rsp)

rosetta.restart(t)
rosettaRest := newRestClient(rosetta)
Expand All @@ -32,6 +33,11 @@ func TestAccounts(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, int64(8999999), gjson.GetBytes(res, "balances.0.value").Int())

// check recipient's balance after receiving tokens
res, err = rosettaRest.accountBalance(toAddr)
assert.NoError(t, err)
assert.Equal(t, int64(1000000), gjson.GetBytes(res, "balances.0.value").Int())

// check balance at genesis, before spent
res, err = rosettaRest.accountBalance(fromAddr, withBlockIdentifier("1"))
assert.NoError(t, err)
Expand Down
6 changes: 4 additions & 2 deletions tests/systemtests/rosetta.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func (r *rosettaRunner) start(t *testing.T) {

r.log("Start Rosetta\n")
r.logf("Execute `%s %s`\n", r.execBinary, strings.Join(args, " "))
// #nosec G204
cmd := exec.Command(locateExecutable(r.execBinary), args...)
cmd.Dir = r.outputDir
r.watchLogs(cmd)
Expand All @@ -103,8 +104,9 @@ func (r *rosettaRunner) awaitRosettaUp(t *testing.T) {
SetBody("{}").
Post("/network/list")
if err == nil {
bk := gjson.GetBytes(res.Body(), "network_identifiers.#.blockchain").Array()[0].String()
require.Equal(t, bk, "testing")
result := gjson.GetBytes(res.Body(), "network_identifiers.#.blockchain").Array()
assert.Greater(t, len(result), 0)
require.Equal(t, result[0].String(), "testing")
t.Log("Rosetta has been started\n")
return
}
Expand Down

0 comments on commit 565ef74

Please sign in to comment.