Skip to content

Commit

Permalink
trim log
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Nov 27, 2024
1 parent cee77b5 commit 318856d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/systemtests/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"os"
"path/filepath"
"strings"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -68,6 +69,11 @@ func TestExportCmd_WithHeight(t *testing.T) {

for _, tc := range testCases {
res := cli.RunCommandWithArgs(tc.args...)
// sometimes the output contains some logs, so we need to extract the json part
if i := strings.Index(res, "{"); i > 0 {
res = res[i:]
}

height := gjson.Get(res, "initial_height").Int()
if tc.expZeroHeight {
require.Equal(t, height, int64(0))
Expand Down

0 comments on commit 318856d

Please sign in to comment.