fix: stabilize beads and config tests (#560)
* fix: stabilize beads and config tests * fix: remove t.Parallel() incompatible with t.Setenv() The test now uses t.Setenv() which cannot be used with t.Parallel() in Go. This completes the conflict resolution from the rebase. * style: fix gofmt issue in beads_test.go Remove extra blank line in comment block. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1212,11 +1212,18 @@ func TestBuildStartupCommand_UsesRigAgentWhenRigPathProvided(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBuildStartupCommand_UsesRoleAgentsFromTownSettings(t *testing.T) {
|
||||
skipIfAgentBinaryMissing(t, "gemini", "codex")
|
||||
t.Parallel()
|
||||
townRoot := t.TempDir()
|
||||
rigPath := filepath.Join(townRoot, "testrig")
|
||||
|
||||
binDir := t.TempDir()
|
||||
for _, name := range []string{"gemini", "codex"} {
|
||||
path := filepath.Join(binDir, name)
|
||||
if err := os.WriteFile(path, []byte("#!/bin/sh\nexit 0\n"), 0755); err != nil {
|
||||
t.Fatalf("write %s stub: %v", name, err)
|
||||
}
|
||||
}
|
||||
t.Setenv("PATH", binDir+string(os.PathListSeparator)+os.Getenv("PATH"))
|
||||
|
||||
// Configure town settings with role_agents
|
||||
townSettings := NewTownSettings()
|
||||
townSettings.DefaultAgent = "claude"
|
||||
|
||||
Reference in New Issue
Block a user