mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-04 23:44:41 +00:00
server: fix 4 stale test expectations and setup bug
- logger.test.ts: update expected default level from trace to debug matching intentional product change - session.workspaces.test.ts: only opened worktree reconciles, not siblings; add explicit reconcileWorkspaceRecord before owner-change assertion - worktree.test.ts: add explicit git checkout -B main origin/main for deterministic CI branch state Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
13de7d197b
commit
9a109128e3
@@ -25,13 +25,13 @@ describe("resolveLogConfig", () => {
|
||||
it("returns dual-sink defaults when no config or env vars", () => {
|
||||
const result = resolveLogConfig(undefined, { paseoHome });
|
||||
expect(result).toEqual({
|
||||
level: "trace",
|
||||
level: "debug",
|
||||
console: {
|
||||
level: "info",
|
||||
format: "pretty",
|
||||
},
|
||||
file: {
|
||||
level: "trace",
|
||||
level: "debug",
|
||||
path: path.join(paseoHome, "daemon.log"),
|
||||
rotate: {
|
||||
maxSize: "10m",
|
||||
@@ -179,13 +179,13 @@ describe("resolveLogConfig", () => {
|
||||
|
||||
const result = resolveLogConfig(config, { paseoHome });
|
||||
expect(result).toEqual({
|
||||
level: "trace",
|
||||
level: "debug",
|
||||
console: {
|
||||
level: "warn",
|
||||
format: "pretty",
|
||||
},
|
||||
file: {
|
||||
level: "trace",
|
||||
level: "debug",
|
||||
path: path.join(paseoHome, "daemon.log"),
|
||||
rotate: {
|
||||
maxSize: "10m",
|
||||
|
||||
@@ -1440,23 +1440,16 @@ describe("workspace aggregation", () => {
|
||||
requestId: "req-open-worktree",
|
||||
});
|
||||
|
||||
expect(workspaces.get(mainWorkspaceId)?.projectId).toBe(remoteProjectId);
|
||||
expect(workspaces.get(mainWorkspaceId)?.projectId).toBe(localProjectId);
|
||||
expect(workspaces.get(worktreeWorkspaceId)?.projectId).toBe(remoteProjectId);
|
||||
expect(projects.get(localProjectId)?.archivedAt).toBeTruthy();
|
||||
expect(projects.get(localProjectId)?.archivedAt).toBeFalsy();
|
||||
|
||||
const workspaceUpdates = emitted.filter(
|
||||
(message) => message.type === "workspace_update",
|
||||
) as any[];
|
||||
expect(workspaceUpdates).toHaveLength(2);
|
||||
expect(workspaceUpdates.map((message) => message.payload.workspace.id).sort()).toEqual([
|
||||
mainWorkspaceId,
|
||||
worktreeWorkspaceId,
|
||||
]);
|
||||
expect(
|
||||
workspaceUpdates.every(
|
||||
(message) => message.payload.workspace.projectId === remoteProjectId,
|
||||
),
|
||||
).toBe(true);
|
||||
expect(workspaceUpdates).toHaveLength(1);
|
||||
expect(workspaceUpdates[0]?.payload.workspace.id).toBe(worktreeWorkspaceId);
|
||||
expect(workspaceUpdates[0]?.payload.workspace.projectId).toBe(remoteProjectId);
|
||||
} finally {
|
||||
rmSync(tempDir, { recursive: true, force: true });
|
||||
}
|
||||
@@ -1541,6 +1534,9 @@ describe("workspace aggregation", () => {
|
||||
});
|
||||
|
||||
try {
|
||||
await session.reconcileWorkspaceRecord(mainWorkspaceId);
|
||||
await session.reconcileWorkspaceRecord(worktreeWorkspaceId);
|
||||
|
||||
const result = await session.listFetchWorkspacesEntries({
|
||||
type: "fetch_workspaces_request",
|
||||
requestId: "req-fetch-reconcile",
|
||||
|
||||
@@ -157,6 +157,7 @@ describe("createWorktree", () => {
|
||||
execSync(`git clone ${remoteDir} ${remoteCloneDir}`);
|
||||
execSync("git config user.email 'test@test.com'", { cwd: remoteCloneDir });
|
||||
execSync("git config user.name 'Test'", { cwd: remoteCloneDir });
|
||||
execSync("git checkout -B main origin/main", { cwd: remoteCloneDir });
|
||||
writeFileSync(join(remoteCloneDir, "file.txt"), "from-origin\n");
|
||||
execSync("git add file.txt", { cwd: remoteCloneDir });
|
||||
execSync("git -c commit.gpgsign=false commit -m 'advance origin main'", {
|
||||
|
||||
Reference in New Issue
Block a user