Merge pull request #46997 from jlowdermilk/no-hr-gcloud

Automatic merge from submit-queue (batch tested with PRs 46997, 47021)

Don't parse human-readable output from gcloud in tests

This is the reason  `[k8s.io] Services should be able to change the type and ports of a service [Slow]` is currently failing on GKE e2e tests. For GKE jobs we run a prerelease version of gcloud, in which the default command output was changed.

gcloud's default output for commands is human readable, and is subject to change. Anything scripting against gcloud should always pass `--format=json|yaml|value(...)`  so you get standardized output.

fixes: #46918
This commit is contained in:
Kubernetes Submit Queue 2017-06-06 20:12:16 -07:00 committed by GitHub
commit 25352a7fb5

View File

@ -48,7 +48,7 @@ func CreateGCEStaticIP(name string) (string, error) {
for attempts := 0; attempts < 4; attempts++ {
outputBytes, err = exec.Command("gcloud", "compute", "addresses", "create",
name, "--project", TestContext.CloudConfig.ProjectID,
"--region", region, "-q").CombinedOutput()
"--region", region, "-q", "--format=yaml").CombinedOutput()
if err == nil {
break
}