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

fix e2e-test make target #4069

Merged
merged 1 commit into from
May 7, 2019

Conversation

nicknovitski
Copy link
Contributor

  • explicitly wait for api token
  • only use posix shell conditionals

What this PR does / why we need it:

The e2e-test make target is run with sh, not bash, which means that the operator =~ is not available, so the guard clause doesn't actually work.

output from ci:

if  [ "kubernetes-admin@ingress-nginx-dev" != "minikube" ] && \
		[ "kubernetes-admin@ingress-nginx-dev" =~ .*kind* ] && \
		[ "kubernetes-admin@ingress-nginx-dev" != "dind" ] && \
		[ "kubernetes-admin@ingress-nginx-dev" != "docker-for-desktop" ]; then \
		echo "kubectl context is "kubernetes-admin@ingress-nginx-dev", but must be one of [minikube, *kind*, dind, docker-for-deskop]"; \
		exit 1; \
	fi
/bin/sh: 2: [: kubernetes-admin@ingress-nginx-dev: unexpected operator

Another ci problem that's incredibly annoying is that the target has a chance to fail on the kubectl run command because the service account doesn't have a valid api token yet.

output from ci:

kubectl run --rm -i --tty \
		--attach \
		--restart=Never \
		--generator=run-pod/v1 \
		--env="E2E_NODES=10" \
		--env="FOCUS=.*" \
		--env="SLOW_E2E_THRESHOLD=50" \
		--overrides='{ "apiVersion": "v1", "spec":{"serviceAccountName": "ingress-nginx-e2e"}}' \
		e2e --image=nginx-ingress-controller:e2e
Error from server (ServerTimeout): No API token found for service account "ingress-nginx-e2e", retry after the token is automatically created and added to the service account
make: *** [e2e-test] Error 1
make: Leaving directory `/home/travis/build/kubernetes/ingress-nginx'
The command "test/e2e/run.sh" exited with 2.

Special notes for your reviewer: spun out from #4055

- explicitly wait for api token
- only use posix shell conditionals
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 7, 2019
@k8s-ci-robot k8s-ci-robot requested review from aledbf and ElvinEfendi May 7, 2019 23:42
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 7, 2019
@nicknovitski nicknovitski marked this pull request as ready for review May 7, 2019 23:49
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 7, 2019
@aledbf
Copy link
Member

aledbf commented May 7, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 7, 2019
@aledbf
Copy link
Member

aledbf commented May 7, 2019

@nicknovitski thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, nicknovitski

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2019
@k8s-ci-robot k8s-ci-robot merged commit 78d582c into kubernetes:master May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants