Fix ha_master test: ignore stderr from 'gcloud' (warnings etc)

pull/8/head
Andrei Zhlobich 2018-03-21 14:13:01 +01:00
parent 426c0dc1bc
commit a3713905d8
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ func createNewRC(c clientset.Interface, ns string, name string) {
}
func findRegionForZone(zone string) string {
region, err := exec.Command("gcloud", "compute", "zones", "list", zone, "--quiet", "--format=csv[no-heading](region)").CombinedOutput()
region, err := exec.Command("gcloud", "compute", "zones", "list", zone, "--quiet", "--format=csv[no-heading](region)").Output()
framework.ExpectNoError(err)
if string(region) == "" {
framework.Failf("Region not found; zone: %s", zone)
@ -88,7 +88,7 @@ func findRegionForZone(zone string) string {
func findZonesForRegion(region string) []string {
output, err := exec.Command("gcloud", "compute", "zones", "list", "--filter=region="+region,
"--quiet", "--format=csv[no-heading](name)").CombinedOutput()
"--quiet", "--format=csv[no-heading](name)").Output()
framework.ExpectNoError(err)
zones := strings.Split(string(output), "\n")
return zones