Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Nov 28, 2024
1 parent 215d5c1 commit fe2a634
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/systemtests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.23

require (
cosmossdk.io/math v1.4.0
cosmossdk.io/systemtests v1.0.0-rc.1.0.20241127144844-93c753f40c94
cosmossdk.io/systemtests v1.0.0-rc.1.0.20241128092904-215d5c16f64d
github.com/cosmos/cosmos-sdk v0.50.6
)

Expand Down
4 changes: 2 additions & 2 deletions tests/systemtests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ=
cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk=
cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk=
cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng=
cosmossdk.io/systemtests v1.0.0-rc.1.0.20241127144844-93c753f40c94 h1:l8uFT+jnvc/OTTAcVju0zuVTMSxWpW5M+9I3gExByxw=
cosmossdk.io/systemtests v1.0.0-rc.1.0.20241127144844-93c753f40c94/go.mod h1:ME2eFY/+2CjaFrPOMW8paPXupMzYaDMTKQ1sRvi71hU=
cosmossdk.io/systemtests v1.0.0-rc.1.0.20241128092904-215d5c16f64d h1:zZUt9DD+3qvwnpQHPwYJ5+NEUU4wMFeNpPBegWMfbn8=
cosmossdk.io/systemtests v1.0.0-rc.1.0.20241128092904-215d5c16f64d/go.mod h1:ME2eFY/+2CjaFrPOMW8paPXupMzYaDMTKQ1sRvi71hU=
cosmossdk.io/x/tx v0.13.3-0.20240419091757-db5906b1e894 h1:kHEvzVqpNv/9pnaEPBsgE/FMc+cVmWjSsInRufkZkpQ=
cosmossdk.io/x/tx v0.13.3-0.20240419091757-db5906b1e894/go.mod h1:Tb6/tpONmtL5qFdOMdv1pdvrtJNxcazZBoz04HB71ss=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
Expand Down
16 changes: 5 additions & 11 deletions tests/systemtests/snapshots_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package systemtests
import (
"fmt"
"os"
"strings"
"testing"

"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -42,16 +41,11 @@ func TestSnapshots(t *testing.T) {
require.DirExists(t, fmt.Sprintf("%s/data/snapshots/5/3", node0Dir))

// Check snapshots list
res = cli.RunCommandWithArgs(command, "list", fmt.Sprintf("--home=%s", node0Dir))

// PebbleDB logs are printed directly to stderr.
// Cosmos-DB and Store/v2 do not provide a way to override the logger.
// This isn't problematic in a real-world scenario, but it makes it hard to test the output.
// https://github.com/cockroachdb/pebble/blob/v1.1.2/internal/base/logger.go#L26-L40
// We trim the output to get the JSON part only
result := strings.Split(res, "\n")

require.Contains(t, result[len(result)-1], "height: 5")
res = cli.
WithRunErrorsIgnored().
WithRunSingleOutput(). // pebbledb prints logs to stderr, we cannot override the logger in store/v2 and cosmos-db. This isn't problematic in a real-world scenario, but it makes it hard to test the output.
RunCommandWithArgs(command, "list", fmt.Sprintf("--home=%s", node0Dir))
require.Contains(t, res, "height: 5")

// Dump snapshot
res = cli.RunCommandWithArgs(command, "dump", "5", "3", fmt.Sprintf("--home=%s", node0Dir), fmt.Sprintf("--output=%s/5-3.tar.gz", node0Dir))
Expand Down

0 comments on commit fe2a634

Please sign in to comment.