[MM-19102] Enable debug flag for plugin check tests (#12588)

Этот коммит содержится в:
Michael Kochell
2019-10-17 10:38:47 -06:00
коммит произвёл 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)
}