mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 07:04:32 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -29,7 +29,7 @@ const runtime: RuntimeEnv = {
|
||||
};
|
||||
|
||||
const baseSnapshot = {
|
||||
path: "/tmp/moltbot.json",
|
||||
path: "/tmp/openclaw.json",
|
||||
exists: true,
|
||||
raw: "{}",
|
||||
parsed: {},
|
||||
@@ -49,16 +49,16 @@ describe("agents set-identity command", () => {
|
||||
});
|
||||
|
||||
it("sets identity from workspace IDENTITY.md", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-identity-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-identity-"));
|
||||
const workspace = path.join(root, "work");
|
||||
await fs.mkdir(workspace, { recursive: true });
|
||||
await fs.writeFile(
|
||||
path.join(workspace, "IDENTITY.md"),
|
||||
[
|
||||
"- Name: Clawd",
|
||||
"- Name: OpenClaw",
|
||||
"- Creature: helpful sloth",
|
||||
"- Emoji: :)",
|
||||
"- Avatar: avatars/clawd.png",
|
||||
"- Avatar: avatars/openclaw.png",
|
||||
"",
|
||||
].join("\n"),
|
||||
"utf-8",
|
||||
@@ -84,15 +84,15 @@ describe("agents set-identity command", () => {
|
||||
};
|
||||
const main = written.agents?.list?.find((entry) => entry.id === "main");
|
||||
expect(main?.identity).toEqual({
|
||||
name: "Clawd",
|
||||
name: "OpenClaw",
|
||||
theme: "helpful sloth",
|
||||
emoji: ":)",
|
||||
avatar: "avatars/clawd.png",
|
||||
avatar: "avatars/openclaw.png",
|
||||
});
|
||||
});
|
||||
|
||||
it("errors when multiple agents match the same workspace", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-identity-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-identity-"));
|
||||
const workspace = path.join(root, "shared");
|
||||
await fs.mkdir(workspace, { recursive: true });
|
||||
await fs.writeFile(path.join(workspace, "IDENTITY.md"), "- Name: Echo\n", "utf-8");
|
||||
@@ -117,16 +117,16 @@ describe("agents set-identity command", () => {
|
||||
});
|
||||
|
||||
it("overrides identity file values with explicit flags", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-identity-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-identity-"));
|
||||
const workspace = path.join(root, "work");
|
||||
await fs.mkdir(workspace, { recursive: true });
|
||||
await fs.writeFile(
|
||||
path.join(workspace, "IDENTITY.md"),
|
||||
[
|
||||
"- Name: Clawd",
|
||||
"- Name: OpenClaw",
|
||||
"- Theme: space lobster",
|
||||
"- Emoji: :)",
|
||||
"- Avatar: avatars/clawd.png",
|
||||
"- Avatar: avatars/openclaw.png",
|
||||
"",
|
||||
].join("\n"),
|
||||
"utf-8",
|
||||
@@ -161,7 +161,7 @@ describe("agents set-identity command", () => {
|
||||
});
|
||||
|
||||
it("reads identity from an explicit IDENTITY.md path", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-identity-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-identity-"));
|
||||
const workspace = path.join(root, "work");
|
||||
const identityPath = path.join(workspace, "IDENTITY.md");
|
||||
await fs.mkdir(workspace, { recursive: true });
|
||||
@@ -197,7 +197,7 @@ describe("agents set-identity command", () => {
|
||||
});
|
||||
|
||||
it("accepts avatar-only identity from IDENTITY.md", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-identity-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-identity-"));
|
||||
const workspace = path.join(root, "work");
|
||||
await fs.mkdir(workspace, { recursive: true });
|
||||
await fs.writeFile(
|
||||
@@ -243,7 +243,7 @@ describe("agents set-identity command", () => {
|
||||
});
|
||||
|
||||
it("errors when identity data is missing", async () => {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-identity-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-identity-"));
|
||||
const workspace = path.join(root, "work");
|
||||
await fs.mkdir(workspace, { recursive: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user