Skip to content

Commit 013eb80

Browse files
authored
chore: bump tastora to v0.8.0 (#6171)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. --> ## Overview [v0.8.0](https://github.com/celestiaorg/tastora/releases/tag/v0.8.0) contains some fixes to ensure resources are cleaned up properly after test runs. There is dedicated type for the tastora client instead of using the docker client directly. There was some flakiness in `TestStateSyncWithAppUpgrade`, it passed locally every time for me and passed after a re-run, not sure if this has been an issue, but I can look into it if it becomes an issue. <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. -->
1 parent 0fbcd81 commit 013eb80

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

test/docker-e2e/dockerchain/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ package dockerchain
22

33
import (
44
"fmt"
5+
tastoratypes "github.com/celestiaorg/tastora/framework/types"
56
"os"
67

78
"github.com/celestiaorg/celestia-app/v6/pkg/appconsts"
89
"github.com/celestiaorg/celestia-app/v6/test/util/genesis"
910
"github.com/celestiaorg/celestia-app/v6/test/util/testnode"
10-
"github.com/moby/moby/client"
1111
)
1212

1313
const (
@@ -22,12 +22,12 @@ type Config struct {
2222
*testnode.Config
2323
Image string
2424
Tag string
25-
DockerClient *client.Client
25+
DockerClient tastoratypes.TastoraDockerClient
2626
DockerNetworkID string
2727
}
2828

2929
// DefaultConfig returns a configured instance of Config with a custom genesis and validators.
30-
func DefaultConfig(client *client.Client, network string) *Config {
30+
func DefaultConfig(client tastoratypes.TastoraDockerClient, network string) *Config {
3131
tnCfg := testnode.DefaultConfig()
3232
// default + 2 extra validators.
3333
tnCfg.Genesis = tnCfg.Genesis.
@@ -68,7 +68,7 @@ func (c *Config) WithTag(tag string) *Config {
6868
}
6969

7070
// WithDockerClient sets the docker client and returns the Config.
71-
func (c *Config) WithDockerClient(client *client.Client) *Config {
71+
func (c *Config) WithDockerClient(client tastoratypes.TastoraDockerClient) *Config {
7272
c.DockerClient = client
7373
return c
7474
}

test/docker-e2e/e2e_full_stack_pfb_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
da "github.com/celestiaorg/tastora/framework/docker/dataavailability"
2020
"github.com/celestiaorg/tastora/framework/testutil/wait"
2121
tastoratypes "github.com/celestiaorg/tastora/framework/types"
22-
dockerclient "github.com/moby/moby/client"
2322
)
2423

2524
const (
@@ -92,7 +91,7 @@ func (s *CelestiaTestSuite) TestE2EFullStackPFB() {
9291
}
9392

9493
// DeployDANetwork deploys a data availability network with bridge, full, and light nodes
95-
func (s *CelestiaTestSuite) DeployDANetwork(ctx context.Context, celestia *tastoradockertypes.Chain, dockerClient *dockerclient.Client, networkID string) *da.Network {
94+
func (s *CelestiaTestSuite) DeployDANetwork(ctx context.Context, celestia *tastoradockertypes.Chain, dockerClient tastoratypes.TastoraDockerClient, networkID string) *da.Network {
9695
t := s.T()
9796

9897
// Create node configurations

test/docker-e2e/e2e_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
rpcclient "github.com/cometbft/cometbft/rpc/client"
1818
coretypes "github.com/cometbft/cometbft/rpc/core/types"
1919
"github.com/docker/docker/api/types/network"
20-
"github.com/moby/moby/client"
2120
"github.com/stretchr/testify/require"
2221
"github.com/stretchr/testify/suite"
2322
"go.uber.org/zap"
@@ -39,15 +38,15 @@ func TestCelestiaTestSuite(t *testing.T) {
3938
type CelestiaTestSuite struct {
4039
suite.Suite
4140
logger *zap.Logger
42-
client *client.Client
41+
client tastoratypes.TastoraDockerClient
4342
network string
4443
celestiaCfg *dockerchain.Config // Config used to build the celestia chain, needed for upgrades
4544
}
4645

4746
func (s *CelestiaTestSuite) SetupSuite() {
4847
s.logger = zaptest.NewLogger(s.T())
4948
s.logger.Info("Setting up Celestia test suite: " + s.T().Name())
50-
s.client, s.network = tastoradockertypes.DockerSetup(s.T())
49+
s.client, s.network = tastoradockertypes.Setup(s.T())
5150
}
5251

5352
// CreateTxSim deploys and starts a txsim container to simulate transactions against the given celestia chain in the test environment.
@@ -98,7 +97,7 @@ func (s *CelestiaTestSuite) CreateTxSim(ctx context.Context, chain tastoratypes.
9897
}
9998

10099
// getNetworkNameFromID resolves the network name given its ID.
101-
func getNetworkNameFromID(ctx context.Context, cli *client.Client, networkID string) (string, error) {
100+
func getNetworkNameFromID(ctx context.Context, cli tastoratypes.TastoraDockerClient, networkID string) (string, error) {
102101
network, err := cli.NetworkInspect(ctx, networkID, network.InspectOptions{})
103102
if err != nil {
104103
return "", fmt.Errorf("failed to inspect network %s: %w", networkID, err)

test/docker-e2e/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ require (
66
cosmossdk.io/math v1.5.3
77
github.com/celestiaorg/celestia-app/v6 v6.0.0-rc0
88
github.com/celestiaorg/go-square/v3 v3.0.2
9-
github.com/celestiaorg/tastora v0.7.5
9+
github.com/celestiaorg/tastora v0.8.0
1010
github.com/cometbft/cometbft v0.38.17
1111
github.com/cosmos/cosmos-sdk v0.50.13
1212
github.com/cosmos/ibc-go/v8 v8.7.0
1313
github.com/docker/docker v28.5.2+incompatible
14-
github.com/moby/moby v28.5.2+incompatible
1514
github.com/stretchr/testify v1.11.1
1615
go.uber.org/zap v1.27.0
1716
golang.org/x/sync v0.18.0
@@ -194,6 +193,7 @@ require (
194193
github.com/mitchellh/go-homedir v1.1.0 // indirect
195194
github.com/mitchellh/mapstructure v1.5.0 // indirect
196195
github.com/moby/docker-image-spec v1.3.1 // indirect
196+
github.com/moby/moby v28.5.2+incompatible // indirect
197197
github.com/moby/sys/sequential v0.6.0 // indirect
198198
github.com/mtibben/percent v0.2.1 // indirect
199199
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect

test/docker-e2e/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,8 @@ github.com/celestiaorg/nmt v0.24.2 h1:LlpJSPOd6/Lw1Ig6HUhZuqiINHLka/ZSRTBzlNJpch
794794
github.com/celestiaorg/nmt v0.24.2/go.mod h1:vgLBpWBi8F5KLxTdXSwb7AU4NhiIQ1AQRGa+PzdcLEA=
795795
github.com/celestiaorg/rsmt2d v0.15.1 h1:NF4D0LX501oDjw00RoJrTUrMHrO+Kv0LewL0FKQU7hg=
796796
github.com/celestiaorg/rsmt2d v0.15.1/go.mod h1:WKkpXoD1foHn4qgFx6GNoz36Wm0fbCh29ze4rA7ZwCs=
797-
github.com/celestiaorg/tastora v0.7.5 h1:LT1MPpRB7Jd2LcBBoVwtimBh1NIxueG7c5DQwfTpZ0g=
798-
github.com/celestiaorg/tastora v0.7.5/go.mod h1:Xw44XeRN2T/kSdopVCJjNhwFwRSO58wTW8GrVP7OWFI=
797+
github.com/celestiaorg/tastora v0.8.0 h1:+FWAIsP2onwwqPTGzBLIBtx8B1h9sImdx4msv2N4DsI=
798+
github.com/celestiaorg/tastora v0.8.0/go.mod h1:9b5GsL/+pKEw3HZG/nd3qhnGadUnNNoTBygy9HeGIyw=
799799
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
800800
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
801801
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
@@ -860,8 +860,8 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:
860860
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
861861
github.com/cometbft/cometbft-db v1.0.4 h1:cezb8yx/ZWcF124wqUtAFjAuDksS1y1yXedvtprUFxs=
862862
github.com/cometbft/cometbft-db v1.0.4/go.mod h1:M+BtHAGU2XLrpUxo3Nn1nOCcnVCiLM9yx5OuT0u5SCA=
863-
github.com/consensys/gnark-crypto v0.18.0 h1:vIye/FqI50VeAr0B3dx+YjeIvmc3LWz4yEfbWBpTUf0=
864-
github.com/consensys/gnark-crypto v0.18.0/go.mod h1:L3mXGFTe1ZN+RSJ+CLjUt9x7PNdx8ubaYfDROyp2Z8c=
863+
github.com/consensys/gnark-crypto v0.18.1 h1:RyLV6UhPRoYYzaFnPQA4qK3DyuDgkTgskDdoGqFt3fI=
864+
github.com/consensys/gnark-crypto v0.18.1/go.mod h1:L3mXGFTe1ZN+RSJ+CLjUt9x7PNdx8ubaYfDROyp2Z8c=
865865
github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM=
866866
github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
867867
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=

test/docker-e2e/networks/networks.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ package networks
33
import (
44
"celestiaorg/celestia-app/test/docker-e2e/dockerchain"
55
"fmt"
6+
tastoratypes "github.com/celestiaorg/tastora/framework/types"
67
"io"
78
"net/http"
89
"testing"
910

1011
"github.com/celestiaorg/celestia-app/v6/app"
1112
"github.com/celestiaorg/celestia-app/v6/test/util/testnode"
12-
celestiadockertypes "github.com/celestiaorg/tastora/framework/docker/cosmos"
1313
tastoracontainertypes "github.com/celestiaorg/tastora/framework/docker/container"
14+
celestiadockertypes "github.com/celestiaorg/tastora/framework/docker/cosmos"
1415
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
1516
"github.com/cosmos/cosmos-sdk/types/module/testutil"
16-
"github.com/moby/moby/client"
1717
"github.com/stretchr/testify/require"
1818
)
1919

2020
// NewConfig returns a configured instance of dockerchain.Config for the specified chain.
21-
func NewConfig(networkCfg *Config, client *client.Client, network string) (*dockerchain.Config, error) {
21+
func NewConfig(networkCfg *Config, client tastoratypes.TastoraDockerClient, network string) (*dockerchain.Config, error) {
2222
// create minimal config - the genesis will be downloaded by the NewChainBuilder
2323
tnCfg := testnode.DefaultConfig()
2424
tnCfg.Genesis = tnCfg.Genesis.WithChainID(networkCfg.ChainID)

0 commit comments

Comments
 (0)