[MM-19102] Enable debug flag for plugin check tests (#12588)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ee1f458bb1
Коммит
83bab2c125
@@ -4,6 +4,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -35,6 +36,11 @@ func TestRunCheck(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
// Enable debug flag to have packagesdriver/sizes.go print stderr of `go list` command.
|
||||
// We want to surface any error text that may exist in stderr of this command.
|
||||
prevEnvValue := os.Getenv("GOPACKAGESPRINTGOLISTERRORS")
|
||||
os.Setenv("GOPACKAGESPRINTGOLISTERRORS", "true")
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
err := runCheck(tc.pkgPath)
|
||||
@@ -46,4 +52,5 @@ func TestRunCheck(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
os.Setenv("GOPACKAGESPRINTGOLISTERRORS", prevEnvValue)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user