mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 17:01:53 +03:00
refactor: rename to openclaw
This commit is contained in:
+22
-22
@@ -40,7 +40,7 @@ describe("docker-setup.sh", () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const rootDir = await mkdtemp(join(tmpdir(), "moltbot-docker-setup-"));
|
||||
const rootDir = await mkdtemp(join(tmpdir(), "openclaw-docker-setup-"));
|
||||
const scriptPath = join(rootDir, "docker-setup.sh");
|
||||
const dockerfilePath = join(rootDir, "Dockerfile");
|
||||
const composePath = join(rootDir, "docker-compose.yml");
|
||||
@@ -52,7 +52,7 @@ describe("docker-setup.sh", () => {
|
||||
await writeFile(dockerfilePath, "FROM scratch\n");
|
||||
await writeFile(
|
||||
composePath,
|
||||
"services:\n moltbot-gateway:\n image: noop\n moltbot-cli:\n image: noop\n",
|
||||
"services:\n openclaw-gateway:\n image: noop\n openclaw-cli:\n image: noop\n",
|
||||
);
|
||||
await writeDockerStub(binDir, logPath);
|
||||
|
||||
@@ -60,13 +60,13 @@ describe("docker-setup.sh", () => {
|
||||
...process.env,
|
||||
PATH: `${binDir}:${process.env.PATH ?? ""}`,
|
||||
DOCKER_STUB_LOG: logPath,
|
||||
CLAWDBOT_GATEWAY_TOKEN: "test-token",
|
||||
CLAWDBOT_CONFIG_DIR: join(rootDir, "config"),
|
||||
CLAWDBOT_WORKSPACE_DIR: join(rootDir, "clawd"),
|
||||
OPENCLAW_GATEWAY_TOKEN: "test-token",
|
||||
OPENCLAW_CONFIG_DIR: join(rootDir, "config"),
|
||||
OPENCLAW_WORKSPACE_DIR: join(rootDir, "openclaw"),
|
||||
};
|
||||
delete env.CLAWDBOT_DOCKER_APT_PACKAGES;
|
||||
delete env.CLAWDBOT_EXTRA_MOUNTS;
|
||||
delete env.CLAWDBOT_HOME_VOLUME;
|
||||
delete env.OPENCLAW_DOCKER_APT_PACKAGES;
|
||||
delete env.OPENCLAW_EXTRA_MOUNTS;
|
||||
delete env.OPENCLAW_HOME_VOLUME;
|
||||
|
||||
const result = spawnSync("bash", [scriptPath], {
|
||||
cwd: rootDir,
|
||||
@@ -77,12 +77,12 @@ describe("docker-setup.sh", () => {
|
||||
expect(result.status).toBe(0);
|
||||
|
||||
const envFile = await readFile(join(rootDir, ".env"), "utf8");
|
||||
expect(envFile).toContain("CLAWDBOT_DOCKER_APT_PACKAGES=");
|
||||
expect(envFile).toContain("CLAWDBOT_EXTRA_MOUNTS=");
|
||||
expect(envFile).toContain("CLAWDBOT_HOME_VOLUME=");
|
||||
expect(envFile).toContain("OPENCLAW_DOCKER_APT_PACKAGES=");
|
||||
expect(envFile).toContain("OPENCLAW_EXTRA_MOUNTS=");
|
||||
expect(envFile).toContain("OPENCLAW_HOME_VOLUME=");
|
||||
});
|
||||
|
||||
it("plumbs CLAWDBOT_DOCKER_APT_PACKAGES into .env and docker build args", async () => {
|
||||
it("plumbs OPENCLAW_DOCKER_APT_PACKAGES into .env and docker build args", async () => {
|
||||
const assocCheck = spawnSync("bash", ["-c", "declare -A _t=()"], {
|
||||
encoding: "utf8",
|
||||
});
|
||||
@@ -90,7 +90,7 @@ describe("docker-setup.sh", () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const rootDir = await mkdtemp(join(tmpdir(), "moltbot-docker-setup-"));
|
||||
const rootDir = await mkdtemp(join(tmpdir(), "openclaw-docker-setup-"));
|
||||
const scriptPath = join(rootDir, "docker-setup.sh");
|
||||
const dockerfilePath = join(rootDir, "Dockerfile");
|
||||
const composePath = join(rootDir, "docker-compose.yml");
|
||||
@@ -102,7 +102,7 @@ describe("docker-setup.sh", () => {
|
||||
await writeFile(dockerfilePath, "FROM scratch\n");
|
||||
await writeFile(
|
||||
composePath,
|
||||
"services:\n moltbot-gateway:\n image: noop\n moltbot-cli:\n image: noop\n",
|
||||
"services:\n openclaw-gateway:\n image: noop\n openclaw-cli:\n image: noop\n",
|
||||
);
|
||||
await writeDockerStub(binDir, logPath);
|
||||
|
||||
@@ -110,12 +110,12 @@ describe("docker-setup.sh", () => {
|
||||
...process.env,
|
||||
PATH: `${binDir}:${process.env.PATH ?? ""}`,
|
||||
DOCKER_STUB_LOG: logPath,
|
||||
CLAWDBOT_DOCKER_APT_PACKAGES: "ffmpeg build-essential",
|
||||
CLAWDBOT_GATEWAY_TOKEN: "test-token",
|
||||
CLAWDBOT_CONFIG_DIR: join(rootDir, "config"),
|
||||
CLAWDBOT_WORKSPACE_DIR: join(rootDir, "clawd"),
|
||||
CLAWDBOT_EXTRA_MOUNTS: "",
|
||||
CLAWDBOT_HOME_VOLUME: "",
|
||||
OPENCLAW_DOCKER_APT_PACKAGES: "ffmpeg build-essential",
|
||||
OPENCLAW_GATEWAY_TOKEN: "test-token",
|
||||
OPENCLAW_CONFIG_DIR: join(rootDir, "config"),
|
||||
OPENCLAW_WORKSPACE_DIR: join(rootDir, "openclaw"),
|
||||
OPENCLAW_EXTRA_MOUNTS: "",
|
||||
OPENCLAW_HOME_VOLUME: "",
|
||||
};
|
||||
|
||||
const result = spawnSync("bash", [scriptPath], {
|
||||
@@ -127,10 +127,10 @@ describe("docker-setup.sh", () => {
|
||||
expect(result.status).toBe(0);
|
||||
|
||||
const envFile = await readFile(join(rootDir, ".env"), "utf8");
|
||||
expect(envFile).toContain("CLAWDBOT_DOCKER_APT_PACKAGES=ffmpeg build-essential");
|
||||
expect(envFile).toContain("OPENCLAW_DOCKER_APT_PACKAGES=ffmpeg build-essential");
|
||||
|
||||
const log = await readFile(logPath, "utf8");
|
||||
expect(log).toContain("--build-arg CLAWDBOT_DOCKER_APT_PACKAGES=ffmpeg build-essential");
|
||||
expect(log).toContain("--build-arg OPENCLAW_DOCKER_APT_PACKAGES=ffmpeg build-essential");
|
||||
});
|
||||
|
||||
it("keeps docker-compose gateway command in sync", async () => {
|
||||
|
||||
Reference in New Issue
Block a user