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

Refactor e2e #3800

Merged
merged 1 commit into from
Feb 25, 2019
Merged

Refactor e2e #3800

merged 1 commit into from
Feb 25, 2019

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Feb 22, 2019

What this PR does / why we need it:

In order to migrate to kind to run the e2e test we need some changes:

  • Run tests as a pod inside the cluster
  • Remove the need to use Nodeport
  • Fix some issues with wait.Poll that introduce random failures

I also took the opportunity to cleanup the Framework struct and methods

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

@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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 22, 2019
@aledbf aledbf force-pushed the refactor-e2e branch 8 times, most recently from 7ac9338 to 4a616e1 Compare February 23, 2019 17:03
@aledbf aledbf changed the title WIP: Refactor e2e Refactor e2e Feb 23, 2019
@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 Feb 23, 2019
@@ -230,7 +198,7 @@ func (f *Framework) matchNginxConditions(name string, matcher func(cfg string) b

o, err := f.ExecCommand(pod, cmd)
if err != nil {
return false, err
return false, nil
Copy link
Member

Choose a reason for hiding this comment

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

why are we not returning the err anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because returning an error breaks the poll loop

Copy link
Member

Choose a reason for hiding this comment

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

oops - so that means all the polling e2e tests have been doing weren't really polling?!

@ElvinEfendi
Copy link
Member

Just few questions overall looks good to me, also it'd be better if you did framework refactoring (removing IngressController) in a separate PR.

@ElvinEfendi
Copy link
Member

Squash the commits please - then it's good to go.

@aledbf aledbf force-pushed the refactor-e2e branch 6 times, most recently from 24002dc to 1813dd0 Compare February 24, 2019 22:05
@ElvinEfendi
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 25, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 merged commit 8f5e7de into kubernetes:master Feb 25, 2019
@aledbf aledbf deleted the refactor-e2e branch February 25, 2019 00:39
@ElvinEfendi
Copy link
Member

@aledbf this has broken running e2e tests locally on OSX at least. I did make e2e-test-image and then make e2e-test and got

...
Running e2e test suite...
/e2e.sh: line 51: /usr/local/bin/ginkgo: cannot execute binary file: Exec format error
pod default/e2e terminated (Error)
make: *** [e2e-test] Error 126

I tried

diff --git a/build/build-e2e.sh b/build/build-e2e.sh
index bf73e34c9..eaa25d127 100755
--- a/build/build-e2e.sh
+++ b/build/build-e2e.sh
@@ -18,4 +18,4 @@ set -o errexit
 set -o nounset
 set -o pipefail

-ginkgo build ./test/e2e
+GOOS=linux GOARCH=amd64 ginkgo build ./test/e2e

and rebuilt the image, but it did not help. Do you know what's going on?

@aledbf
Copy link
Member Author

aledbf commented Feb 26, 2019

@ElvinEfendi yes, my fault. I am using the existing ginkgo and e2e.test binaries, something not possible. I will open a PR to build the binaries correctly every time.

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants