mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-06 23:55:12 +00:00
test: clean up Docker test-state leftovers
This commit is contained in:
@@ -224,10 +224,6 @@ TRASH
|
||||
run_wizard_cmd "$case_name" "$home_dir" "node \"$OPENCLAW_ENTRY\" onboard $ONBOARD_FLAGS" "$send_fn" true "$validate_fn"
|
||||
}
|
||||
|
||||
make_home() {
|
||||
mktemp -d "/tmp/openclaw-e2e-$1.XXXXXX"
|
||||
}
|
||||
|
||||
set_isolated_openclaw_env() {
|
||||
local label="$1"
|
||||
openclaw_test_state_create "$label" empty
|
||||
|
||||
@@ -43,19 +43,11 @@ cat > \"\$HOME/.openclaw/extensions/lossless-claw/package.json\" <<'JSON'
|
||||
\"version\": \"0.9.0\"
|
||||
}
|
||||
JSON
|
||||
if [ \"\$OPENCLAW_PACKAGE_ACCEPTANCE_LEGACY_COMPAT\" = \"1\" ]; then
|
||||
cat > \"\$HOME/.openclaw/openclaw.json\" <<'JSON'
|
||||
cat > \"\$OPENCLAW_CONFIG_PATH\" <<'JSON'
|
||||
{
|
||||
\"plugins\": {}
|
||||
}
|
||||
JSON
|
||||
else
|
||||
cat > \"\$HOME/.openclaw/openclaw.json\" <<'JSON'
|
||||
{
|
||||
\"plugins\": {}
|
||||
}
|
||||
JSON
|
||||
fi
|
||||
mkdir -p \"\$HOME/.openclaw/plugins\"
|
||||
cat > \"\$HOME/.openclaw/plugins/installs.json\" <<'JSON'
|
||||
{
|
||||
@@ -144,7 +136,7 @@ fi
|
||||
|
||||
before_config_hash=\"\"
|
||||
if [ \"\$OPENCLAW_PACKAGE_ACCEPTANCE_LEGACY_COMPAT\" != \"1\" ]; then
|
||||
before_config_hash=\$(sha256sum \"\$HOME/.openclaw/openclaw.json\" | awk '{print \$1}')
|
||||
before_config_hash=\$(sha256sum \"\$OPENCLAW_CONFIG_PATH\" | awk '{print \$1}')
|
||||
fi
|
||||
|
||||
node --input-type=module > /tmp/plugin-update-before.json <<'NODE'
|
||||
@@ -182,7 +174,7 @@ NODE
|
||||
node \"\$entry\" plugins update @example/lossless-claw > /tmp/plugin-update-output.log 2>&1
|
||||
|
||||
if [ -n \"\$before_config_hash\" ]; then
|
||||
after_config_hash=\$(sha256sum \"\$HOME/.openclaw/openclaw.json\" | awk '{print \$1}')
|
||||
after_config_hash=\$(sha256sum \"\$OPENCLAW_CONFIG_PATH\" | awk '{print \$1}')
|
||||
if [ \"\$before_config_hash\" != \"\$after_config_hash\" ]; then
|
||||
echo \"Config changed unexpectedly for modern package \$package_version\"
|
||||
cat /tmp/plugin-update-output.log
|
||||
|
||||
@@ -6,7 +6,7 @@ const PLUGIN_UPDATE_DOCKER_SCRIPT = "scripts/e2e/plugin-update-unchanged-docker.
|
||||
describe("plugin update unchanged Docker E2E", () => {
|
||||
it("seeds current plugin install ledger state before checking config stability", () => {
|
||||
const script = readFileSync(PLUGIN_UPDATE_DOCKER_SCRIPT, "utf8");
|
||||
const configSeedStart = script.indexOf('cat > \\"\\$HOME/.openclaw/openclaw.json\\"');
|
||||
const configSeedStart = script.indexOf('cat > \\"\\$OPENCLAW_CONFIG_PATH\\"');
|
||||
const configSeedEnd = script.indexOf('cat > \\"\\$HOME/.openclaw/plugins/installs.json\\"');
|
||||
const configSeed = script.slice(configSeedStart, configSeedEnd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user