Skip to content

Commit

Permalink
chore: remove remaining pocketic test exclusions (#4061)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamspofford-dfinity authored Jan 11, 2025
1 parent 097a49a commit c2a8857
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 17 deletions.
14 changes: 7 additions & 7 deletions e2e/tests-dfx/bitcoin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ set_local_network_bitcoin_enabled() {
}

@test "dfx restarts replica when ic-btc-adapter restarts" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: PocketIC does not expose bitcoin adapter"
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: bitcoin adapter is a replica implementation detail"
dfx_new_assets hello
dfx_start --enable-bitcoin

Expand Down Expand Up @@ -87,15 +87,15 @@ set_local_network_bitcoin_enabled() {
}

@test "dfx start --bitcoin-node <node> implies --enable-bitcoin" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: PocketIC does not expose bitcoin adapter"
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: bitcoin adapter is a replica implementation detail"
dfx_new hello
dfx_start "--bitcoin-node" "127.0.0.1:18444"

assert_file_not_empty "$E2E_SHARED_LOCAL_NETWORK_DATA_DIRECTORY/ic-btc-adapter-pid"
}

@test "dfx start --enable-bitcoin with no other configuration succeeds" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: PocketIC does not expose bitcoin adapter"
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: bitcoin adapter is a replica implementation detail"
dfx_new hello

dfx_start --enable-bitcoin
Expand All @@ -114,7 +114,7 @@ set_local_network_bitcoin_enabled() {
}

@test "can enable bitcoin through default configuration - dfx start" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: PocketIC does not expose bitcoin adapter"
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: bitcoin adapter is a replica implementation detail"
dfx_new hello
define_project_network
set_project_default_bitcoin_enabled
Expand All @@ -125,7 +125,7 @@ set_local_network_bitcoin_enabled() {
}

@test "can enable bitcoin through shared local network - dfx start" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: PocketIC does not expose bitcoin adapter"
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: bitcoin adapter is a replica implementation detail"
dfx_new hello
set_shared_local_network_bitcoin_enabled

Expand All @@ -135,7 +135,7 @@ set_local_network_bitcoin_enabled() {
}

@test "can enable bitcoin through local network configuration - dfx start" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: PocketIC does not expose bitcoin adapter"
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: bitcoin adapter is a replica implementation detail"
dfx_new hello
set_local_network_bitcoin_enabled

Expand All @@ -145,7 +145,7 @@ set_local_network_bitcoin_enabled() {
}

@test "dfx start with both bitcoin and canister http enabled" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: PocketIC does not expose bitcoin adapter"
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: bitcoin adapter is a replica implementation detail"
dfx_new hello

dfx_start --enable-bitcoin --enable-canister-http
Expand Down
2 changes: 2 additions & 0 deletions e2e/tests-dfx/canister_http_adapter.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

load ../utils/_

# all skipped for pocketic: outcall adapter is a replica implementation detail

setup() {
standard_setup
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests-dfx/create.bash
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ teardown() {
}

@test "create succeeds when specify large canister ID" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: subnet range"
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: nonexistent subnet ranges are unsupported"
dfx_start
# hhn2s-5l777-77777-7777q-cai is the canister ID of (u64::MAX / 2)
assert_command dfx canister create e2e_project_backend --specified-id hhn2s-5l777-77777-7777q-cai
Expand Down
1 change: 0 additions & 1 deletion e2e/tests-dfx/cycles-ledger.bash
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@ current_time_nanoseconds() {
}

@test "automatically choose subnet" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: subnet range"
dfx_start

REGISTRY="rwlgt-iiaaa-aaaaa-aaaaa-cai"
Expand Down
2 changes: 0 additions & 2 deletions e2e/tests-dfx/deps.bash
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,6 @@ Installing canister: $CANISTER_ID_C (dep_c)"
}

@test "dfx deps can facade pull ckBTC ledger" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic which doesn't have ckBTC subnet"

use_test_specific_cache_root # dfx deps pull will download files to cache

Expand Down Expand Up @@ -783,7 +782,6 @@ Installing canister: $CANISTER_ID_C (dep_c)"


@test "dfx deps can facade pull ckETH ledger" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic which doesn't have ckETH subnet"

use_test_specific_cache_root # dfx deps pull will download files to cache

Expand Down
4 changes: 0 additions & 4 deletions e2e/tests-dfx/start.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ teardown() {
}

@test "start and stop with different options" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: clean required"
dfx_start --artificial-delay 101
dfx_stop

Expand All @@ -62,7 +61,6 @@ teardown() {
}

@test "stop and start with other options does not disrupt projects" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: clean required"
dfx_start --artificial-delay 101

dfx_new p1
Expand Down Expand Up @@ -481,7 +479,6 @@ teardown() {
}

@test "modifying networks.json does not require --clean on restart" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: --force"
dfx_start
dfx stop
assert_command dfx_start
Expand All @@ -491,7 +488,6 @@ teardown() {
}

@test "project-local networks require --clean if dfx.json was updated" {
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: --force"
dfx_new
define_project_network
dfx_start
Expand Down
10 changes: 10 additions & 0 deletions src/dfx-core/src/config/model/dfinity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,16 @@ impl ReplicaLogLevel {
Self::Trace => "trace".to_string(),
}
}
pub fn to_pocketic_string(&self) -> String {
match self {
Self::Critical => "CRITICAL".to_string(),
Self::Error => "ERROR".to_string(),
Self::Warning => "WARN".to_string(),
Self::Info => "INFO".to_string(),
Self::Debug => "DEBUG".to_string(),
Self::Trace => "TRACE".to_string(),
}
}
}

/// # Local Replica Configuration
Expand Down
4 changes: 2 additions & 2 deletions src/dfx/src/actors/pocketic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ async fn initialize_pocketic(
nns: Some(SubnetSpec::default()),
sns: Some(SubnetSpec::default()),
ii: Some(SubnetSpec::default()),
fiduciary: None,
fiduciary: Some(SubnetSpec::default()),
bitcoin: Some(SubnetSpec::default()),
system: vec![],
verified_application: vec![],
Expand All @@ -369,7 +369,7 @@ async fn initialize_pocketic(
subnet_config_set,
state_dir: Some(replica_config.state_manager.state_root.clone()),
nonmainnet_features: true,
log_level: Some(replica_config.log_level.to_ic_starter_string()),
log_level: Some(replica_config.log_level.to_pocketic_string()),
bitcoind_addr: bitcoind_addr.clone(),
})
.send()
Expand Down

0 comments on commit c2a8857

Please sign in to comment.