-
Notifications
You must be signed in to change notification settings - Fork 301
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
Script to run local e2e test #1110
Conversation
/assign @rramkumar1 @spencerhance |
@bowei: GitHub didn't allow me to assign the following users: spencerhance. Note that only kubernetes members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
hack/run-local-e2e.sh
Outdated
local name=$1 | ||
local zone=$2 | ||
# Globals. | ||
nodeTag=$(gcloud compute instances describe gke-test-default-pool-2b81ea3d-sw3l --zone us-west2-b --format='value(tags.items[0])') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix this? Seems to be hardcoded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
hack/run-local-e2e.sh
Outdated
@@ -0,0 +1,89 @@ | |||
#/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be called run-local.sh? It's just running the controller, not the e2e tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, fixing
hack/run-local-e2e.sh
Outdated
fi | ||
|
||
fmt='value(networkConfig.network,networkConfig.subnetwork,zone,selfLink,name)' | ||
parseCluster $(gcloud container clusters list --format=${fmt} | grep "${clusterName}\$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there two clusters with the same name in different zones would this work? I think the script should accept zone/region as an arg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added optional param
When trying this locally I get the following error:
|
fixed issues, got rid of unneeded script generation |
hack/setup-local.sh will setup your environment to be able to run locally for easy development. Usage $ gcloud auth application-default login ... $ ./hack/setup-local.sh ... $ ./hack/run-glbc-local.sh ... ^C
fi | ||
|
||
GCECONF=${GCECONF:-/tmp/gce.conf} | ||
GLBC=${GLBC:-./glbc} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to assume the glbc executable is in this directory? If you run the script as is, it won't work unless you build first and move the executable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can do that by
GLBC=mypath/xxx hack/run-local-glbc.sh
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bowei, rramkumar1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
hack/run-local-e2e.sh will setup your environment and
write some scripts to help run e2e tests from a locally built
binary.
Usage
$ ./hack/run-local-e2e.sh my-cluster
...
$ bash /tmp/run-glbc.sh # run proxy and controller