Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete target pools and forwarding rules with -q in guestbook.sh #5262

Merged
merged 1 commit into from
Mar 12, 2015

Conversation

bprashanth
Copy link
Contributor

Without -q gcloud prompts for confirmation before deleting rules, failing the e2e suite on local runs. This PR also adds checks for a default compute/region setting, without which gcloud will fail even with -q because it doesn't know which region to use.

}

prepare-e2e

trap "teardown" EXIT

if gcloud config list compute/region --format text | grep 'compute.region: None'; then
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't that just take the ZONE from an env variable and use it to recreate the region, are you recommending a similar approach?

I could use sed/awk or something to parse out 'None' but I figured eitherway I won't know what to search for, and if the format of the string changes both will most likely break. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I'm recommending a similar approach given the e2e zone, which is what we have to do in other tests as well (I think there are a few other cases). You actually don't care what the gcloud default is, FWIW - I run my e2es in a different zone (though the same region, I guess), than my default zone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, updated.

@bprashanth
Copy link
Contributor Author

PTAL

zmerlynn added a commit that referenced this pull request Mar 12, 2015
Delete target pools and forwarding rules with -q in guestbook.sh
@zmerlynn zmerlynn merged commit 996f9e6 into kubernetes:master Mar 12, 2015
@bprashanth bprashanth deleted the e2e_services branch October 26, 2015 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants