diff --git a/tests/integration/git_adapter_ssh_test.go b/tests/integration/git_adapter_ssh_test.go index 302d2cf2..895e1fea 100644 --- a/tests/integration/git_adapter_ssh_test.go +++ b/tests/integration/git_adapter_ssh_test.go @@ -160,11 +160,12 @@ func TestGitAdapter_SSH_CleanupOnExecFailure(t *testing.T) { // TestGitAdapter_SSH_HostMismatch_NoTmpfile: rejected host mismatch must // NOT leave an orphaned tmpfile in os.TempDir(). func TestGitAdapter_SSH_HostMismatch_NoTmpfile(t *testing.T) { - t.Parallel() - cred := sshCredFor(t, "github.com") adapter := tools.AdapterFor("git") + // This assertion observes os.TempDir(), which is process-global. Keep it + // serial so other SSH lifecycle tests cannot create legitimate temp keys + // between the before/after snapshots. before, _ := filepath.Glob(filepath.Join(os.TempDir(), "goclaw-gitkey-*")) _, err := adapter.Prepare(context.Background(), nil, cred, []string{"clone", "git@gitlab.com:o/r.git"})