@@ -64,6 +64,7 @@ const PLUGIN_UPDATE_CORRUPT_SCENARIO_PATH =
6464 "scripts/e2e/lib/plugin-update/corrupt-update-scenario.sh" ;
6565const PLUGIN_UPDATE_PROBE_PATH = "scripts/e2e/lib/plugin-update/probe.mjs" ;
6666const PLUGIN_LIFECYCLE_MATRIX_DOCKER_E2E_PATH = "scripts/e2e/plugin-lifecycle-matrix-docker.sh" ;
67+ const PLUGIN_LIFECYCLE_MATRIX_SWEEP_PATH = "scripts/e2e/lib/plugin-lifecycle-matrix/sweep.sh" ;
6768const DOCTOR_SWITCH_DOCKER_E2E_PATH = "scripts/e2e/doctor-install-switch-docker.sh" ;
6869const DOCTOR_SWITCH_SCENARIO_PATH = "scripts/e2e/lib/doctor-install-switch/scenario.sh" ;
6970const PACKAGE_COMPAT_PATH = "scripts/e2e/lib/package-compat.mjs" ;
@@ -1077,6 +1078,17 @@ grep -qx -- "OPENCLAW_E2E_COMMAND_TIMEOUT=23s" "$TMPDIR/package-args"
10771078 expect ( runner ) . toContain ( 'docker_e2e_run_with_harness \\\n "${DOCKER_ENV_ARGS[@]}"' ) ;
10781079 } ) ;
10791080
1081+ it ( "cleans plugin lifecycle matrix temp roots on exit" , ( ) => {
1082+ const sweep = readFileSync ( PLUGIN_LIFECYCLE_MATRIX_SWEEP_PATH , "utf8" ) ;
1083+
1084+ expect ( sweep ) . toContain ( "cleanup() {" ) ;
1085+ expect ( sweep ) . toContain ( "openclaw_plugins_cleanup_fixture_servers" ) ;
1086+ expect ( sweep ) . toContain ( 'rm -rf "$resource_dir"' ) ;
1087+ expect ( sweep ) . toContain ( 'rm -rf "$pack_root"' ) ;
1088+ expect ( sweep ) . toContain ( 'rm -rf "$registry_root"' ) ;
1089+ expect ( sweep . match ( / t r a p c l e a n u p E X I T / g) ) . toHaveLength ( 2 ) ;
1090+ } ) ;
1091+
10801092 it ( "wraps direct Docker E2E npm installs with the shared timeout helper" , ( ) => {
10811093 const multiNode = readFileSync ( MULTI_NODE_UPDATE_DOCKER_E2E_PATH , "utf8" ) ;
10821094 const updateChannel = readFileSync ( UPDATE_CHANNEL_SWITCH_DOCKER_E2E_PATH , "utf8" ) ;
0 commit comments