Skip to content

Commit ddd5226

Browse files
committed
Splitted tests
1 parent afd8734 commit ddd5226

File tree

9 files changed

+57
-46
lines changed

9 files changed

+57
-46
lines changed

.github/workflows/tests.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,9 @@ jobs:
556556
strategy:
557557
matrix:
558558
test:
559-
- single_node
559+
- single_node_bootstrap_from_replayer
560+
- single_node_accept_incoming
561+
- single_node_initial_joining
560562
- multi_node_initial_joining
561563
- multi_node_peer_discovery
562564
- multi_node_propagate_block
@@ -636,7 +638,11 @@ jobs:
636638
MINA_DISCOVERY_FILTER_ADDR: false
637639
strategy:
638640
matrix:
639-
test: [record_replay, webrtc_record_replay]
641+
test:
642+
[
643+
record_replay_record_replay_block_production,
644+
record_replay_record_replay_bootstrap,
645+
]
640646
fail-fast: false
641647

642648
steps:

node/testing/tests/record_replay.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use mina_node_testing::scenarios::record_replay::block_production::RecordReplayBlockProduction;
2+
3+
mod common;
4+
5+
scenario_test!(
6+
record_replay_block_production,
7+
RecordReplayBlockProduction,
8+
RecordReplayBlockProduction,
9+
true
10+
);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use mina_node_testing::scenarios::record_replay::bootstrap::RecordReplayBootstrap;
2+
3+
mod common;
4+
5+
scenario_test!(
6+
record_replay_bootstrap,
7+
RecordReplayBootstrap,
8+
RecordReplayBootstrap,
9+
true
10+
);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#[cfg(not(feature = "p2p-webrtc"))]
2+
use mina_node_testing::scenarios::solo_node::basic_connectivity_accept_incoming::SoloNodeBasicConnectivityAcceptIncoming;
3+
4+
mod common;
5+
6+
#[cfg(not(feature = "p2p-webrtc"))]
7+
scenario_test!(
8+
accept_incoming,
9+
SoloNodeBasicConnectivityAcceptIncoming,
10+
SoloNodeBasicConnectivityAcceptIncoming
11+
);

node/testing/tests/single_node.rs renamed to node/testing/tests/single_node_bootstrap_from_replayer.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
1-
#[cfg(not(feature = "p2p-webrtc"))]
2-
use mina_node_testing::scenarios::solo_node::basic_connectivity_accept_incoming::SoloNodeBasicConnectivityAcceptIncoming;
3-
use mina_node_testing::scenarios::solo_node::{
4-
basic_connectivity_initial_joining::SoloNodeBasicConnectivityInitialJoining,
5-
bootstrap::SoloNodeBootstrap,
6-
};
1+
use mina_node_testing::scenarios::solo_node::bootstrap::SoloNodeBootstrap;
72

83
mod common;
94

10-
#[cfg(not(feature = "p2p-webrtc"))]
11-
scenario_test!(
12-
accept_incoming,
13-
SoloNodeBasicConnectivityAcceptIncoming,
14-
SoloNodeBasicConnectivityAcceptIncoming
15-
);
16-
17-
scenario_test!(
18-
initial_joining,
19-
SoloNodeBasicConnectivityInitialJoining,
20-
SoloNodeBasicConnectivityInitialJoining
21-
);
22-
235
// To run locally:
246
// ```bash
257
// export MINA_DISCOVERY_FILTER_ADDR=false
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
use mina_node_testing::scenarios::solo_node::basic_connectivity_initial_joining::SoloNodeBasicConnectivityInitialJoining;
2+
3+
mod common;
4+
5+
scenario_test!(
6+
initial_joining,
7+
SoloNodeBasicConnectivityInitialJoining,
8+
SoloNodeBasicConnectivityInitialJoining
9+
);

website/docs/developers/testing/network-connectivity.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ execution of test scenarios on a cluster of nodes.
190190

191191
**Scenarios Enumeration**: `Scenarios` is an enum with derived traits to support
192192
iterating over the scenarios, converting them to strings, etc. It lists
193-
different test scenarios such as `SoloNodeSyncRootSnarkedLedger`,
194-
`SoloNodeBasicConnectivityInitialJoining`, and
193+
different test scenarios such as `SoloNodeBasicConnectivityInitialJoining`, and
195194
`MultiNodeBasicConnectivityInitialJoining`.
196195

197196
Each scenario has a related module (e.g.,

website/docs/node-operators/testing/overview.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Tests related to outgoing connections
171171
- `ConnectToInitialPeersBecomeReady`: Node should be able to connect to all
172172
initial peers after they become ready.
173173

174-
### [Single Node](https://github.com/o1-labs/mina-rust/blob/develop/node/testing/tests/single_node.rs):
174+
### [Single Node](https://github.com/o1-labs/mina-rust/blob/develop/node/testing/tests/single_node_accept_incoming.rs):
175175

176176
We want to test whether the Rust node is compatible with the OCaml node. We
177177
achieve this by attempting to connect the Mina Rust node to the existing OCaml
@@ -185,11 +185,12 @@ cluster.
185185
- `SoloNodeBasicConnectivityAcceptIncoming`: Local test to ensure that the Mina
186186
Rust node can accept a connection from an existing OCaml node.
187187

188+
### [Single Node](https://github.com/o1-labs/mina-rust/blob/develop/node/testing/tests/single_node_initial_joining.rs):
189+
188190
- `SoloNodeBasicConnectivityInitialJoining`: Local test to ensure that the Mina
189191
Rust node can connect to an existing OCaml testnet.
190192

191-
- `SoloNodeSyncRootSnarkedLedger`: Set up single Rust node and sync up root
192-
snarked ledger.
193+
### [Single Node](https://github.com/o1-labs/mina-rust/blob/develop/node/testing/tests/single_node_bootstrap_from_replayer.rs):
193194

194195
- `SoloNodeBootstrap`: Set up single Rust node and bootstrap snarked ledger,
195196
bootstrap ledger and blocks.
@@ -209,10 +210,12 @@ the testing is completely local and under our control.
209210
- `MultiNodeBasicConnectivityInitialJoining`: Tests that node maintains number
210211
of peers between minimum and maximum allowed peers.
211212

212-
### [Record/Replay](https://github.com/o1-labs/mina-rust/blob/develop/node/testing/tests/record_replay.rs)
213+
### [Record/Replay Bootstrap](https://github.com/o1-labs/mina-rust/blob/develop/node/testing/tests/record_replay_record_replay_bootstrap.rs)
213214

214215
- `RecordReplayBootstrap`: Bootstrap a rust node while recorder of state and
215216
input actions is enabled and make sure we can successfully replay it.
216217

218+
### [Record/Replay Block Production](https://github.com/o1-labs/mina-rust/blob/develop/node/testing/tests/record_replay_record_replay_block_production.rs)
219+
217220
- `RecordReplayBlockProduction`: Makes sure we can successfully record and
218221
replay multiple nodes in the cluster + block production.

0 commit comments

Comments
 (0)