Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk committed Nov 12, 2024
1 parent 20b05df commit 4948c4e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions e2e/tests-dfx/start.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ teardown() {
assert_command diff "$NETWORK_ID_PATH" "$NETWORK_ID_BY_SETTINGS_DIGEST_PATH"
}

@test "start and stop" {
dfx_start
dfx_stop

dfx_start
dfx_stop
}

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

Expand All @@ -41,6 +50,7 @@ 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 @@ -455,6 +465,7 @@ 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 @@ -464,6 +475,7 @@ 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
4 changes: 2 additions & 2 deletions src/dfx/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub struct StartOpts {
artificial_delay: u32,

/// Start even if the network config was modified.
#[arg(long)]
#[arg(long, conflicts_with = "pocketic")]
force: bool,

/// A list of domains that can be served. These are used for canister resolution [default: localhost]
Expand Down Expand Up @@ -332,7 +332,7 @@ pub fn exec(
&local_server_descriptor.scope,
LocalNetworkScopeDescriptor::Shared { .. }
);
if is_shared_network {
if is_shared_network && !pocketic {
save_json_file(
&local_server_descriptor.effective_config_path_by_settings_digest(),
&effective_config,
Expand Down

0 comments on commit 4948c4e

Please sign in to comment.