Skip to content

Commit 1e87dd9

Browse files
randygrokjgimenotac0turtle
authored
test: increase e2e tests for resiliency (#2531)
<!-- 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. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview <!-- 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. Ex: Closes #<issue number> --> --------- Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com> Co-authored-by: Marko <marko@baricevic.me>
1 parent 017d6d4 commit 1e87dd9

3 files changed

Lines changed: 970 additions & 27 deletions

File tree

test/docker-e2e/docker_test.go

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (s *DockerTestSuite) SetupDockerResources(opts ...ConfigOption) {
114114
s.provider = s.CreateDockerProvider(opts...)
115115
s.celestia = s.CreateChain()
116116
s.daNetwork = s.CreateDANetwork()
117-
s.evNodeChain = s.CreateRollkitChain()
117+
s.evNodeChain = s.CreateEvolveChain()
118118
}
119119

120120
// CreateChain creates a chain using the ChainBuilder pattern.
@@ -164,8 +164,8 @@ func (s *DockerTestSuite) CreateDANetwork() tastoratypes.DataAvailabilityNetwork
164164
return daNetwork
165165
}
166166

167-
// CreateRollkitChain creates a Rollkit chain using the provider
168-
func (s *DockerTestSuite) CreateRollkitChain() tastoratypes.RollkitChain {
167+
// CreateEvolveChain creates a Rollkit chain using the provider
168+
func (s *DockerTestSuite) CreateEvolveChain() tastoratypes.RollkitChain {
169169
ctx := context.Background()
170170

171171
rollkitChain, err := s.provider.GetRollkitChain(ctx)
@@ -226,6 +226,29 @@ func (s *DockerTestSuite) StartEvNode(ctx context.Context, bridgeNode tastoratyp
226226
s.Require().NoError(err)
227227
}
228228

229+
// StartRollkitNodeWithNamespace initializes and starts a Rollkit node with a specific namespace.
230+
func (s *DockerTestSuite) StartRollkitNodeWithNamespace(ctx context.Context, bridgeNode tastoratypes.DANode, rollkitNode tastoratypes.RollkitNode, namespace string) {
231+
err := rollkitNode.Init(ctx)
232+
s.Require().NoError(err)
233+
234+
bridgeNodeHostName, err := bridgeNode.GetInternalHostName()
235+
s.Require().NoError(err)
236+
237+
authToken, err := bridgeNode.GetAuthToken()
238+
s.Require().NoError(err)
239+
240+
daAddress := fmt.Sprintf("http://%s:26658", bridgeNodeHostName)
241+
err = rollkitNode.Start(ctx,
242+
"--rollkit.da.address", daAddress,
243+
"--rollkit.da.gas_price", "0.025",
244+
"--rollkit.da.auth_token", authToken,
245+
"--rollkit.rpc.address", "0.0.0.0:7331", // bind to 0.0.0.0 so rpc is reachable from test host.
246+
"--rollkit.da.namespace", namespace,
247+
"--kv-endpoint", "0.0.0.0:8080",
248+
)
249+
s.Require().NoError(err)
250+
}
251+
229252
// getEvNodeImage returns the Docker image configuration for Rollkit
230253
// Uses EV_NODE_IMAGE_REPO and EV_NODE_IMAGE_TAG environment variables if set
231254
// Defaults to locally built image using a unique tag to avoid registry conflicts

test/docker-e2e/go.mod

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,10 @@ module github.com/evstack/ev-node/test/docker-e2e
22

33
go 1.24.2
44

5-
require github.com/celestiaorg/tastora v0.2.3
6-
7-
require (
8-
cosmossdk.io/x/upgrade v0.1.4 // indirect
9-
github.com/chzyer/readline v1.5.1 // indirect
10-
github.com/cosmos/ibc-go/modules/capability v1.0.1 // indirect
11-
github.com/cosmos/ibc-go/v8 v8.7.0 // indirect
12-
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
13-
github.com/manifoldco/promptui v0.9.0 // indirect
14-
)
15-
165
require (
17-
github.com/golang/mock v1.6.0 // indirect
18-
github.com/google/orderedcode v0.0.1 // indirect
19-
github.com/google/uuid v1.6.0 // indirect
20-
github.com/grafana/otel-profiling-go v0.5.1 // indirect
21-
github.com/grafana/pyroscope-go v1.2.0 // indirect
22-
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect
23-
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
24-
github.com/lib/pq v1.10.9 // indirect
25-
github.com/minio/highwayhash v1.0.3 // indirect
26-
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0 // indirect
6+
cosmossdk.io/math v1.5.3
7+
github.com/celestiaorg/tastora v0.2.3
8+
github.com/stretchr/testify v1.10.0
279
go.uber.org/zap v1.27.0
2810
)
2911

@@ -34,9 +16,9 @@ require (
3416
cosmossdk.io/depinject v1.1.0 // indirect
3517
cosmossdk.io/errors v1.0.1 // indirect
3618
cosmossdk.io/log v1.4.1 // indirect
37-
cosmossdk.io/math v1.5.3
3819
cosmossdk.io/store v1.1.1 // indirect
3920
cosmossdk.io/x/tx v0.13.7 // indirect
21+
cosmossdk.io/x/upgrade v0.1.4 // indirect
4022
filippo.io/edwards25519 v1.1.0 // indirect
4123
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
4224
github.com/99designs/keyring v1.2.1 // indirect
@@ -69,6 +51,7 @@ require (
6951
github.com/celestiaorg/nmt v0.23.0 // indirect
7052
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
7153
github.com/cespare/xxhash/v2 v2.3.0 // indirect
54+
github.com/chzyer/readline v1.5.1 // indirect
7255
github.com/cockroachdb/errors v1.11.3 // indirect
7356
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
7457
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
@@ -86,6 +69,8 @@ require (
8669
github.com/cosmos/gogogateway v1.2.0 // indirect
8770
github.com/cosmos/gogoproto v1.7.0 // indirect
8871
github.com/cosmos/iavl v1.2.2 // indirect
72+
github.com/cosmos/ibc-go/modules/capability v1.0.1 // indirect
73+
github.com/cosmos/ibc-go/v8 v8.7.0 // indirect
8974
github.com/cosmos/ics23/go v0.11.0 // indirect
9075
github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect
9176
github.com/danieljoos/wincred v1.1.2 // indirect
@@ -95,7 +80,7 @@ require (
9580
github.com/dgraph-io/badger/v4 v4.2.0 // indirect
9681
github.com/dgraph-io/ristretto v0.1.1 // indirect
9782
github.com/distribution/reference v0.6.0 // indirect
98-
github.com/docker/docker v28.3.3+incompatible // indirect
83+
github.com/docker/docker v28.3.3+incompatible
9984
github.com/docker/go-connections v0.5.0 // indirect
10085
github.com/docker/go-units v0.5.0 // indirect
10186
github.com/dustin/go-humanize v1.0.1 // indirect
@@ -110,19 +95,26 @@ require (
11095
github.com/go-logfmt/logfmt v0.6.0 // indirect
11196
github.com/go-logr/logr v1.4.2 // indirect
11297
github.com/go-logr/stdr v1.2.2 // indirect
98+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
11399
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
114100
github.com/gogo/googleapis v1.4.1 // indirect
115101
github.com/gogo/protobuf v1.3.2 // indirect
116102
github.com/golang/glog v1.2.4 // indirect
117103
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
104+
github.com/golang/mock v1.6.0 // indirect
118105
github.com/golang/protobuf v1.5.4 // indirect
119106
github.com/golang/snappy v0.0.4 // indirect
120107
github.com/google/btree v1.1.3 // indirect
121108
github.com/google/flatbuffers v1.12.1 // indirect
122109
github.com/google/go-cmp v0.7.0 // indirect
110+
github.com/google/orderedcode v0.0.1 // indirect
111+
github.com/google/uuid v1.6.0 // indirect
123112
github.com/gorilla/handlers v1.5.2 // indirect
124113
github.com/gorilla/mux v1.8.1 // indirect
125114
github.com/gorilla/websocket v1.5.3 // indirect
115+
github.com/grafana/otel-profiling-go v0.5.1 // indirect
116+
github.com/grafana/pyroscope-go v1.2.0 // indirect
117+
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect
126118
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
127119
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
128120
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
@@ -131,6 +123,7 @@ require (
131123
github.com/hashicorp/go-metrics v0.5.3 // indirect
132124
github.com/hashicorp/go-plugin v1.5.2 // indirect
133125
github.com/hashicorp/golang-lru v1.0.2 // indirect
126+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
134127
github.com/hashicorp/yamux v0.1.1 // indirect
135128
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
136129
github.com/huandu/skiplist v1.2.0 // indirect
@@ -141,9 +134,12 @@ require (
141134
github.com/klauspost/compress v1.18.0 // indirect
142135
github.com/kr/pretty v0.3.1 // indirect
143136
github.com/kr/text v0.2.0 // indirect
137+
github.com/lib/pq v1.10.9 // indirect
144138
github.com/linxGnu/grocksdb v1.8.14 // indirect
139+
github.com/manifoldco/promptui v0.9.0 // indirect
145140
github.com/mattn/go-colorable v0.1.13 // indirect
146141
github.com/mattn/go-isatty v0.0.20 // indirect
142+
github.com/minio/highwayhash v1.0.3 // indirect
147143
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
148144
github.com/mitchellh/mapstructure v1.5.0 // indirect
149145
github.com/moby/docker-image-spec v1.3.1 // indirect
@@ -175,7 +171,6 @@ require (
175171
github.com/spf13/cobra v1.9.1 // indirect
176172
github.com/spf13/pflag v1.0.6 // indirect
177173
github.com/spf13/viper v1.20.1 // indirect
178-
github.com/stretchr/testify v1.10.0
179174
github.com/subosito/gotenv v1.6.0 // indirect
180175
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
181176
github.com/tendermint/go-amino v0.16.0 // indirect
@@ -188,6 +183,7 @@ require (
188183
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
189184
go.opentelemetry.io/otel v1.36.0 // indirect
190185
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
186+
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0 // indirect
191187
go.opentelemetry.io/otel/metric v1.36.0 // indirect
192188
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
193189
go.opentelemetry.io/otel/trace v1.36.0 // indirect

0 commit comments

Comments
 (0)