test: stage live external plugins

This commit is contained in:
Peter Steinberger
2026-04-11 12:35:26 +01:00
parent 79c3dbecd1
commit 1851aa7944
2 changed files with 19 additions and 0 deletions

View File

@@ -88,6 +88,10 @@ describe("installTestEnv", () => {
}`,
);
writeFile(path.join(realHome, ".openclaw", "credentials", "token.txt"), "secret\n");
writeFile(
path.join(realHome, ".openclaw", "external-plugins", "glueclaw", "openclaw.plugin.json"),
'{"id":"glueclaw"}\n',
);
writeFile(
path.join(realHome, ".openclaw", "agents", "main", "agent", "auth-profiles.json"),
JSON.stringify({ version: 1, profiles: { default: { provider: "openai" } } }, null, 2),
@@ -143,6 +147,17 @@ describe("installTestEnv", () => {
expect(
fs.existsSync(path.join(testEnv.tempHome, ".openclaw", "credentials", "token.txt")),
).toBe(true);
expect(
fs.existsSync(
path.join(
testEnv.tempHome,
".openclaw",
"external-plugins",
"glueclaw",
"openclaw.plugin.json",
),
),
).toBe(true);
expect(
fs.existsSync(
path.join(testEnv.tempHome, ".openclaw", "agents", "main", "agent", "auth-profiles.json"),

View File

@@ -382,6 +382,10 @@ function stageLiveTestState(params: {
}
copyDirIfExists(path.join(realStateDir, "credentials"), path.join(tempStateDir, "credentials"));
copyDirIfExists(
path.join(realStateDir, "external-plugins"),
path.join(tempStateDir, "external-plugins"),
);
copyLiveAuthProfiles(realStateDir, tempStateDir);
for (const authDir of LIVE_EXTERNAL_AUTH_DIRS) {