diff --git a/scripts/ps/test_unit.ps1 b/scripts/ps/test_unit.ps1 index 9c571fed..cafe2816 100755 --- a/scripts/ps/test_unit.ps1 +++ b/scripts/ps/test_unit.ps1 @@ -1,15 +1,5 @@ # Run the unit tests with the race detector and code coverage enabled -$envPath = Join-Path "cmd" "proxy" | Join-Path -ChildPath ".env" -Get-Content $envPath | ForEach-Object { - $line = $_.ToString().Split("=") - if ($line.Length -ne 2) { - return - } - $name = $line[0] - $val = $line[1] - - [System.Environment]::SetEnvironmentVariable($name, $val) -} +if (!(Test-Path env:GO_ENV)) {$env:GO_ENV = "test"} & go test -mod=vendor -race -coverprofile cover.out -covermode atomic ./...