Fix TestRoutingIntegration and improve DetectUserRole robustness

Amp-Thread-ID: https://ampcode.com/threads/T-fc47ce9d-88a4-4bcd-b9cb-79327d98dee7
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-11-20 19:04:42 -05:00
parent 345766badc
commit 8e05847d31
4 changed files with 694 additions and 138 deletions

View File

@@ -14,6 +14,10 @@ import (
)
func TestRoutingIntegration(t *testing.T) {
// Isolate from user's git config (e.g. url.insteadOf) to ensure deterministic URLs
t.Setenv("GIT_CONFIG_GLOBAL", "/dev/null")
t.Setenv("GIT_CONFIG_SYSTEM", "/dev/null")
tests := []struct {
name string
setupGit func(t *testing.T, dir string)