@@ -20,7 +20,7 @@ function Invoke-MgmtTestgen ()
2020 [string ]$config = " autorest.md" ,
2121 [string ]$autorestVersion = " 3.8.2" ,
2222 [string ]$goExtension = " @autorest/go@4.0.0-preview.38" ,
23- [string ]$testExtension = " @autorest/gotest@3.0.0 " ,
23+ [string ]$testExtension = " @autorest/gotest@3.0.1 " ,
2424 [string ]$outputFolder
2525 )
2626 if ($clean )
@@ -297,10 +297,10 @@ function TestAndGenerateReport($dir)
297297{
298298 Set-Location $dir
299299 # dependencies for go coverage report generation
300- go get github.com / jstemmer/ go- junit- report
301- go get github.com / jhendrixMSFT/ gocov/ gocov
302- go get github.com / AlekSi/ gocov- xml
303- go get github.com / matm/ gocov- html
300+ go install github.com / jstemmer/ go- junit- report@v0 .9.1
301+ go install github.com / jhendrixMSFT/ gocov/ gocov@v1 .0.1 - 0.20220325195445 - df8497555dba
302+ go install github.com / AlekSi/ gocov- xml@v1 .0.0
303+ go install github.com / matm/ gocov- html@v0 .0.0 - 20200509184451 - 71874e2e203b
304304
305305 # set azidentity env for mock test
306306 $Env: AZURE_TENANT_ID = " mock-test"
@@ -310,9 +310,9 @@ function TestAndGenerateReport($dir)
310310
311311 # do test with corage report and convert to cobertura format
312312 Write-Host " go cmd: go test -v -coverprofile coverage.txt | Tee-Object -FilePath output.txt"
313- go test - v - coverprofile coverage.txt | Tee-Object - FilePath output .txt
314- Write-Host " report.xml: cat output.txt | go-junit-report > report.xml"
315- cat output .txt | go- junit- report > report.xml
313+ go test - v - coverprofile coverage.txt | Tee-Object - FilePath outfile .txt
314+ Write-Host " report.xml: Get-Content output.txt | go-junit-report > report.xml"
315+ Get-Content outfile .txt | go- junit- report > report.xml
316316 Write-Host " coverage.json: gocov convert ./coverage.txt > ./coverage.json"
317317 gocov convert ./ coverage.txt > ./ coverage.json
318318 Write-Host " coverage.xml: Get-Content ./coverage.json | gocov-xml > ./coverage.xml"
0 commit comments