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

Remove . import from e2e test #78916

Merged
merged 1 commit into from Jun 15, 2019
Merged

Conversation

mkimuram
Copy link
Contributor

@mkimuram mkimuram commented Jun 11, 2019

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:
Part of: #77706

Special notes for your reviewer:
/sig testing
@oomichi

It seems that there are some . imports still remaining. Replaced with the below commands.

$ grep -r '\. "github.com/onsi/' test/e2e | awk -F ":" '{print $1}' | sort -u | while read file;do 
sed -i $file \
-e 's/\. "github.com\/onsi\/gomega"/"github.com\/onsi\/gomega"/' \
-e 's/\. "github.com\/onsi\/ginkgo"/"github.com\/onsi\/ginkgo"/' \
-e 's/(BeNil(/(gomega.BeNil(/' \
-e 's/(HaveOccurred(/(gomega.HaveOccurred(/' \
-e 's/(BeZero(/(gomega.BeZero(/' \
-e 's/(Equal(/(gomega.Equal(/' \
-e 's/(BeIdenticalTo(/(gomega.BeIdenticalTo(/' \
-e 's/(ContainSubstring(/(gomega.ContainSubstring(/' \
-e 's/(BeNumerically(/(gomega.BeNumerically(/' \
-e 's/(BeEmpty(/(gomega.BeEmpty(/' \
-e 's/(HaveLen(/(gomega.HaveLen(/' \
-e 's/(MatchRegexp(/(gomega.MatchRegexp(/' \
-e 's/(BeTrue(/(gomega.BeTrue(/' \
-e 's/\sExpect(/ gomega.Expect(/' \
-e 's/\sEventually(/ gomega.Eventually(/' \
-e 's/\sConsistently(/ gomega.Consistently(/' \
-e 's/\sBeforeEach(/ ginkgo.BeforeEach(/' \
-e 's/\sAfterEach(/ ginkgo.AfterEach(/' \
-e 's/\sContext(/ ginkgo.Context(/' \
-e 's/\sDescribe(/ ginkgo.Describe(/' \
-e 's/\sGinkgoRecover(/ ginkgo.GinkgoRecover(/' \
-e 's/\sIt(/ ginkgo.It(/' \
-e 's/\sBy(/ ginkgo.By(/' 
done
$ git diff --name-only | xargs gofmt -w
$ sed -i test/e2e/common/autoscaling_utils.go -e "s/ginkgo.Context(/Context(/"

$ grep -r "gomega.Expect(err).ToNot(gomega.HaveOccurred()," test/e2e | awk -F ":" '{print $1}' | sort -u | while read file;do sed -i ${file} -e "s/gomega.Expect(err).ToNot(gomega.HaveOccurred(),/framework.ExpectNoError(err,/" ;done
$ grep -r "gomega.Expect(err).To(gomega.HaveOccurred()," test/e2e | awk -F ":" '{print $1}' | sort -u 
test/e2e/framework/util.go

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. sig/testing Categorizes an issue or PR as relevant to SIG Testing. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 11, 2019
@k8s-ci-robot k8s-ci-robot added area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test labels Jun 11, 2019
@oomichi
Copy link
Member

oomichi commented Jun 11, 2019

timer_test.go seems necessary to be updated:

test/e2e/framework/timer/timer_test.go:43:2: undefined: RegisterTestingT
test/e2e/framework/timer/timer_test.go:51:38: undefined: MatchJSON
test/e2e/framework/timer/timer_test.go:74:38: undefined: MatchJSON

@mkimuram
Copy link
Contributor Author

@oomichi

timer_test.go seems necessary to be updated:

Thank you for your comment. The last commit should fix it. PTAL

@oomichi
Copy link
Member

oomichi commented Jun 11, 2019

@mkimuram Thanks for updating.
BTW this PR consists of multiple commit. So can we git merge --squash into a single commit?
TBH I am not 100% sure about that, but sometimes I saw such request during review process as https://kubernetes.slack.com/archives/C09R23FHP/p1560294545032400

@mkimuram
Copy link
Contributor Author

@oomichi

Squashed.

Copy link
Member

@oomichi oomichi left a comment

Choose a reason for hiding this comment

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

Thanks for updating

/lgtm

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

oomichi commented Jun 14, 2019

@mkimuram Unfortunately this needs to be rebased.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 14, 2019
@mkimuram
Copy link
Contributor Author

@oomichi

Thank you for notifying me the need for rebase. Rebased. PTAL

@oomichi
Copy link
Member

oomichi commented Jun 14, 2019

/test pull-kubernetes-e2e-gce

@oomichi
Copy link
Member

oomichi commented Jun 14, 2019

/lgtm

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

oomichi commented Jun 14, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mkimuram, oomichi

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 Jun 14, 2019
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

2 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit c5087f2 into kubernetes:master Jun 15, 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. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants