Skip to content

Commit 6eb8d45

Browse files
mina86Nikolay Kurtov
authored and
Nikolay Kurtov
committed
integration-tests: fix test_tx_not_enough_balance_must_return_error (#7500)
Commit 028fa7c: ‘default genesis minimum gas price’ changed default minimum gas price in localnet which affected actual values in the test. Adjust the expected values to match thus fixing the test. While at it, refactor the code slightly to reduce all the indentation. Issues: #7466
1 parent 63cb181 commit 6eb8d45

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

integration-tests/src/tests/nearcore/rpc_nodes.rs

+19-19
Original file line numberDiff line numberDiff line change
@@ -390,30 +390,30 @@ fn test_tx_not_enough_balance_must_return_error() {
390390
let res = view_client.send(GetBlock::latest()).await;
391391
if let Ok(Ok(block)) = res {
392392
if block.header.height > 10 {
393-
let _ = client
394-
.broadcast_tx_commit(to_base64(&bytes))
395-
.map_err(|err| {
396-
assert_eq!(
397-
err.data.unwrap(),
398-
serde_json::json!({"TxExecutionError": {
399-
"InvalidTxError": {
400-
"NotEnoughBalance": {
401-
"signer_id": "near.0",
402-
"balance": "950000000000000000000000000000000", // If something changes in setup just update this value
403-
"cost": "1100000000000453060601875000000000",
404-
}
405-
}
406-
}})
407-
);
408-
System::current().stop();
409-
})
410-
.map_ok(|_| panic!("Transaction must not succeed"))
411-
.await;
412393
break;
413394
}
414395
}
415396
sleep(std::time::Duration::from_millis(500)).await;
416397
}
398+
let _ = client
399+
.broadcast_tx_commit(to_base64(&bytes))
400+
.map_err(|err| {
401+
assert_eq!(
402+
err.data.unwrap(),
403+
serde_json::json!({"TxExecutionError": {
404+
"InvalidTxError": {
405+
"NotEnoughBalance": {
406+
"signer_id": "near.0",
407+
"balance": "950000000000000000000000000000000", // If something changes in setup just update this value
408+
"cost": "1100000000000045306060187500000000",
409+
}
410+
}
411+
}})
412+
);
413+
System::current().stop();
414+
})
415+
.map_ok(|_| panic!("Transaction must not succeed"))
416+
.await;
417417
});
418418
});
419419
}

0 commit comments

Comments
 (0)