feat: update project name in test helpers and scenarios for consistency
This commit is contained in:
@@ -26,6 +26,11 @@ export const TEST_GROUP_ID = "-5239235162";
|
|||||||
/** Repo path for test issues (devclaw repo) */
|
/** Repo path for test issues (devclaw repo) */
|
||||||
export const TEST_REPO = "laurentenhoor/devclaw";
|
export const TEST_REPO = "laurentenhoor/devclaw";
|
||||||
|
|
||||||
|
/** Project name used in test workspaces. Prefixed with "test-" so session keys
|
||||||
|
* (agent:devclaw:subagent:test-devclaw-dev-junior) don't collide with production
|
||||||
|
* and match TEST_SESSION_PREFIX for cleanup sweeps. */
|
||||||
|
export const TEST_PROJECT_NAME = "test-devclaw";
|
||||||
|
|
||||||
// ── Gateway RPC ─────────────────────────────────────────────────────────────
|
// ── Gateway RPC ─────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -297,7 +302,7 @@ export async function createTestWorkspace(opts?: {
|
|||||||
// Create required directories
|
// Create required directories
|
||||||
await fs.mkdir(path.join(tempDir, "memory"), { recursive: true });
|
await fs.mkdir(path.join(tempDir, "memory"), { recursive: true });
|
||||||
await fs.mkdir(path.join(tempDir, "roles", "default"), { recursive: true });
|
await fs.mkdir(path.join(tempDir, "roles", "default"), { recursive: true });
|
||||||
await fs.mkdir(path.join(tempDir, "roles", "devclaw"), {
|
await fs.mkdir(path.join(tempDir, "roles", TEST_PROJECT_NAME), {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -305,9 +310,9 @@ export async function createTestWorkspace(opts?: {
|
|||||||
const initialData: ProjectsData = {
|
const initialData: ProjectsData = {
|
||||||
projects: {
|
projects: {
|
||||||
[groupId]: {
|
[groupId]: {
|
||||||
name: "devclaw",
|
name: TEST_PROJECT_NAME,
|
||||||
repo: `~/.openclaw/extensions/devclaw`,
|
repo: `~/.openclaw/extensions/devclaw`,
|
||||||
groupName: "DevClaw - DevClaw",
|
groupName: "DevClaw - Test",
|
||||||
deployUrl: "",
|
deployUrl: "",
|
||||||
baseBranch: "main",
|
baseBranch: "main",
|
||||||
deployBranch: "main",
|
deployBranch: "main",
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import { resolveModel } from "../lib/tiers.js";
|
|||||||
import {
|
import {
|
||||||
TestCleanup,
|
TestCleanup,
|
||||||
TEST_GROUP_ID,
|
TEST_GROUP_ID,
|
||||||
|
TEST_PROJECT_NAME,
|
||||||
TEST_REPO,
|
TEST_REPO,
|
||||||
createTestWorkspace,
|
createTestWorkspace,
|
||||||
gateway,
|
gateway,
|
||||||
@@ -424,7 +425,7 @@ describe("DevClaw Scenario Tests", { timeout: 240_000 }, () => {
|
|||||||
}>;
|
}>;
|
||||||
const zombieIssue = issues.find(
|
const zombieIssue = issues.find(
|
||||||
(i) =>
|
(i) =>
|
||||||
i.project === "devclaw" &&
|
i.project === TEST_PROJECT_NAME &&
|
||||||
i.role === "dev",
|
i.role === "dev",
|
||||||
);
|
);
|
||||||
assert.ok(zombieIssue, "Should detect zombie for dev worker");
|
assert.ok(zombieIssue, "Should detect zombie for dev worker");
|
||||||
|
|||||||
Reference in New Issue
Block a user