Skip to content

Commit 7f520e2

Browse files
committed
apollo_base_layer_tests: add logs for Anvil port number
1 parent f062408 commit 7f520e2

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/apollo_base_layer_tests/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ colored.workspace = true
1919
papyrus_base_layer = { workspace = true, features = ["testing"] }
2020
starknet_api.workspace = true
2121
tokio.workspace = true
22+
tracing.workspace = true
2223
url.workspace = true
2324

2425
[dev-dependencies]

crates/apollo_base_layer_tests/src/anvil_base_layer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use papyrus_base_layer::{
2828
use starknet_api::block::BlockHashAndNumber;
2929
use starknet_api::hash::StarkHash;
3030
use starknet_api::transaction::L1HandlerTransaction;
31+
use tracing::info;
3132
use url::Url;
3233

3334
/// Initialize an anvil instance under the default port and deploy the Starknet contract.
@@ -96,6 +97,7 @@ curl -L \
9697
_ => panic!("Failed to spawn Anvil: {}", error.to_string().red()),
9798
});
9899

100+
info!("Deploying Starknet contract to Anvil with port: {}", port);
99101
Starknet::deploy(anvil_client.clone()).await.unwrap();
100102

101103
let config = Self::config(Self::url_static(port));

crates/apollo_base_layer_tests/tests/anvil_starts_with_no_contract.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ use papyrus_base_layer::test_utils::{
1010
OTHER_ARBITRARY_ANVIL_L1_ACCOUNT_ADDRESS,
1111
};
1212
use papyrus_base_layer::BaseLayerContract;
13+
use tracing::info;
1314

1415
#[tokio::test]
1516
async fn anvil_starts_with_no_contract() {
1617
const NUM_L1_TRANSACTIONS: usize = 10;
1718
// TODO(GuyNir/Shahak): avoid this hard-coded port number, and align port usages throughout the
1819
// anvil instances.
20+
info!("Starting Anvil with port: 9999");
1921
let anvil = Anvil::new()
2022
.port(9999_u16)
2123
.try_spawn()

0 commit comments

Comments
 (0)