Skip to content

Commit 09ea6b6

Browse files
committed
fix(e2e): use default state for daemon switch
1 parent 859280e commit 09ea6b6

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎scripts/e2e/lib/doctor-install-switch/scenario.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ run_flow() {
139139

140140
echo "== Flow: $name =="
141141
openclaw_test_state_create "switch-${name}" empty
142+
unset OPENCLAW_HOME OPENCLAW_STATE_DIR OPENCLAW_CONFIG_PATH
142143
export USER="testuser"
143144

144145
if ! openclaw_e2e_maybe_timeout "$command_timeout" bash -c "$install_cmd" >"$install_log" 2>&1; then

‎test/scripts/docker-build-helper.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4370,12 +4370,17 @@ heartbeat_elapsed="\${BASH_REMATCH[1]}"
43704370

43714371
expectTextToIncludeAll(scenario, [
43724372
'command_timeout="${OPENCLAW_DOCKER_DOCTOR_SWITCH_COMMAND_TIMEOUT:-900s}"',
4373+
'openclaw_test_state_create "switch-${name}" empty\n unset OPENCLAW_HOME OPENCLAW_STATE_DIR OPENCLAW_CONFIG_PATH',
43734374
'openclaw_e2e_maybe_timeout "$command_timeout" bash -c "$install_cmd"',
43744375
'openclaw_e2e_maybe_timeout "$command_timeout" bash -c "$doctor_cmd"',
43754376
'openclaw_e2e_maybe_timeout "$command_timeout" "$npm_bin" gateway install --wrapper "$wrapper" --force',
43764377
'openclaw_e2e_maybe_timeout "$command_timeout" node "$git_cli" doctor --repair --force --yes',
43774378
]);
43784379

4380+
expect(
4381+
scenario.match(/unset OPENCLAW_HOME OPENCLAW_STATE_DIR OPENCLAW_CONFIG_PATH/gu),
4382+
).toHaveLength(1);
4383+
43794384
expect(scenario).not.toMatch(/^\s*if ! timeout "\$command_timeout"/mu);
43804385
});
43814386

0 commit comments

Comments
 (0)