mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:40:44 +00:00
test: align plugin docker smoke with install ledger
This commit is contained in:
@@ -750,11 +750,14 @@ cat > "$slash_install_dir/openclaw.plugin.json" <<'JSON'
|
||||
}
|
||||
JSON
|
||||
|
||||
run_gateway_chat_json \
|
||||
if ! run_gateway_chat_json \
|
||||
"plugin-e2e-install" \
|
||||
"/plugin install $slash_install_dir" \
|
||||
/tmp/plugin-command-install.json \
|
||||
30000
|
||||
240000; then
|
||||
cat "$gateway_log" 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
node - <<'NODE'
|
||||
const fs = require("node:fs");
|
||||
const payload = JSON.parse(fs.readFileSync("/tmp/plugin-command-install.json", "utf8"));
|
||||
@@ -971,10 +974,10 @@ node - <<'NODE'
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
|
||||
const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");
|
||||
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
||||
const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json");
|
||||
const index = JSON.parse(fs.readFileSync(indexPath, "utf8"));
|
||||
for (const id of ["marketplace-shortcut", "marketplace-direct"]) {
|
||||
const record = config.plugins?.installs?.[id];
|
||||
const record = index.installRecords?.[id];
|
||||
if (!record) throw new Error(`missing install record for ${id}`);
|
||||
if (record.source !== "marketplace") {
|
||||
throw new Error(`unexpected source for ${id}: ${record.source}`);
|
||||
|
||||
Reference in New Issue
Block a user