Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions eng/pipelines/templates/steps/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ steps:
$testDirs = (./eng/scripts/get_test_dirs.ps1 -serviceDir $(SCOPE))
foreach ($td in $testDirs) {
pushd $td
Write-Host "##[command]Executing go test -run "^Test" -v -coverprofile coverage.txt $td | go-junit-report -set-exit-code > report.xml"
go test -run "^Test" -v -coverprofile coverage.txt . | go-junit-report -set-exit-code > report.xml
Write-Host "##[command]Executing 'go test -run "^Test" -v -coverprofile coverage.txt .' in $td"
go test -run "^Test" -v -coverprofile coverage.txt . | Tee-Object -FilePath outfile.txt
if ($LASTEXITCODE) { exit $LASTEXITCODE }
cat outfile.txt | go-junit-report > report.xml
# if no tests were actually run (e.g. examples) delete the coverage file so it's omitted from the coverage report
if (Select-String -path ./report.xml -pattern '<testsuites></testsuites>' -simplematch -quiet) {
Write-Host "##[command]Deleting empty coverage file"
Expand Down
2 changes: 1 addition & 1 deletion sdk/postgresql/armpostgresql/go_mod_tidy_hack.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
package armpostgresql

// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
import _ "github.com/Azure/azure-sdk-for-go"
import _ "github.com/Azure/azure-sdk-for-go"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There needs to be a new line here or the format check step of pipeline verification will fail