Skip to content

Commit ab65b06

Browse files
committed
fix conflicts
1 parent d22fa38 commit ab65b06

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎cli/tests/offchain_worker.rs‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ use regex::Regex;
2525
use substrate_cli_test_utils as common;
2626
use tokio::process::Command;
2727

28+
/*
29+
* Test that the offchain-worker command works as expected.
30+
* It spawns a local dev node, and then runs the offchain-worker command against it.
31+
* The test covers two cases;
32+
* 1. The offchain-worker command is run with a live state, and should complete successfully.
33+
* 2. The offchain-worker command is run with a snap state, and should terminate with an error.
34+
*/
2835
#[tokio::test]
2936
async fn offchain_worker_works() {
3037
let port = 45789;
@@ -46,7 +53,7 @@ async fn offchain_worker_works() {
4653
// Wait some time to ensure that the node is warmed up.
4754
std::thread::sleep(Duration::from_secs(90));
4855

49-
// Test ok
56+
// 1. Test that the command runs successfully with a live state.
5057
common::run_with_timeout(Duration::from_secs(60), async move {
5158
let ws_url = format!("ws://localhost:{}", port);
5259

@@ -83,7 +90,7 @@ async fn offchain_worker_works() {
8390
})
8491
.await;
8592

86-
// Test attempting to use non-live state. Should terminate with error.
93+
// 2. Test attempting to use non-live state. Should terminate with error.
8794
common::run_with_timeout(Duration::from_secs(60), async move {
8895
let ws_url = format!("ws://localhost:{}", port);
8996

0 commit comments

Comments
 (0)