test(worker): adapt planning tests to git-backed worktree flow
Update constructor calls (6-arg), seed AppSettings with sibling strategy, git-init working dirs via GitRepoFixture.InitRepoWithInitialCommit, and replace McpConfigPath assertions with worktree-path / .mcp.json checks. Also fixes PlanningHubTests which had the same 3-arg constructor. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,21 @@ public sealed class GitRepoFixture : IDisposable
|
||||
return stdout;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new git repo at <paramref name="dir"/> with a seed commit.
|
||||
/// Used by planning tests that need a real git repo as list working directory.
|
||||
/// </summary>
|
||||
public static void InitRepoWithInitialCommit(string dir)
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
RunGit(dir, "init", "-b", "main");
|
||||
RunGit(dir, "config", "user.email", "test@claudedo.local");
|
||||
RunGit(dir, "config", "user.name", "test");
|
||||
File.WriteAllText(Path.Combine(dir, "README.md"), "seed\n");
|
||||
RunGit(dir, "add", "-A");
|
||||
RunGit(dir, "commit", "-m", "chore: seed");
|
||||
}
|
||||
|
||||
private static void ForceDeleteDirectory(string path)
|
||||
{
|
||||
if (!Directory.Exists(path)) return;
|
||||
|
||||
Reference in New Issue
Block a user