diff --git a/tests/systemtests/go.mod b/tests/systemtests/go.mod index f981369260e5..ffc7e7b0b193 100644 --- a/tests/systemtests/go.mod +++ b/tests/systemtests/go.mod @@ -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 ) diff --git a/tests/systemtests/go.sum b/tests/systemtests/go.sum index 8c6c9abba50e..2801bed7b720 100644 --- a/tests/systemtests/go.sum +++ b/tests/systemtests/go.sum @@ -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= diff --git a/tests/systemtests/snapshots_test.go b/tests/systemtests/snapshots_test.go index 63e2c091df3e..fe0b8a39fed0 100644 --- a/tests/systemtests/snapshots_test.go +++ b/tests/systemtests/snapshots_test.go @@ -5,7 +5,6 @@ package systemtests import ( "fmt" "os" - "strings" "testing" "github.com/stretchr/testify/require" @@ -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))