mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 01:31:08 +00:00
test: stage live external plugins
This commit is contained in:
@@ -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"),
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user