test: clear env vars so tests use git config for repo URL
All checks were successful
Push Validation / validate (push) Successful in 1m47s
All checks were successful
Push Validation / validate (push) Successful in 1m47s
This commit is contained in:
@@ -21,6 +21,10 @@ func TestPrepareSuite(t *testing.T) {
|
||||
|
||||
func (s *PrepareSuite) SetupTest() {
|
||||
s.rootDir = s.T().TempDir()
|
||||
// Clear environment variables that take precedence over git config
|
||||
s.T().Setenv("GITHUB_SERVER_URL", "")
|
||||
s.T().Setenv("GITHUB_REPOSITORY", "")
|
||||
|
||||
require.NoError(s.T(), os.MkdirAll(filepath.Join(s.rootDir, ".git"), 0o755))
|
||||
require.NoError(s.T(), os.WriteFile(
|
||||
filepath.Join(s.rootDir, ".git", "config"),
|
||||
|
||||
Reference in New Issue
Block a user