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

use expectEqual in framework #79771

Closed
wants to merge 5 commits into from
Closed

use expectEqual in framework #79771

wants to merge 5 commits into from

Conversation

tealee1992
Copy link

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:

Ref: #79686

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot
Copy link
Contributor

Welcome @tealee1992!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 4, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @tealee1992. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 4, 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 sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 4, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tealee1992
To complete the pull request process, please assign krzyzacy
You can assign the PR to them by writing /assign @krzyzacy in a comment when ready.

The full list of commands accepted by this bot can be found 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

@tealee1992
Copy link
Author

/assign @krzyzacy

Copy link
Contributor

@draveness draveness left a comment

Choose a reason for hiding this comment

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

/ok-to-test
/priority backlog
/lgtm

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 4, 2019
Copy link
Contributor

@draveness draveness left a comment

Choose a reason for hiding this comment

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

/assign @oomichi

@tealee1992
Copy link
Author

/retest

@tealee1992
Copy link
Author

/reset

@@ -672,13 +672,13 @@ func GetPodsScheduled(masterNodes sets.String, pods *v1.PodList) (scheduledPods,
if !masterNodes.Has(pod.Spec.NodeName) {
if pod.Spec.NodeName != "" {
_, scheduledCondition := podutil.GetPodCondition(&pod.Status, v1.PodScheduled)
gomega.Expect(scheduledCondition != nil).To(gomega.Equal(true))
gomega.Expect(scheduledCondition.Status).To(gomega.Equal(v1.ConditionTrue))
framework.ExpectEqual(scheduledCondition != nil, true)
Copy link
Member

Choose a reason for hiding this comment

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

The test jobs are failed like

# k8s.io/kubernetes/test/e2e/framework/pod
test/e2e/framework/pod/resource.go:675:5: undefined: framework
test/e2e/framework/pod/resource.go:676:5: undefined: framework
test/e2e/framework/pod/resource.go:680:5: undefined: framework
test/e2e/framework/pod/resource.go:681:5: undefined: framework

Because here is in the framework itself. We need to remove framework from here.

Copy link
Author

Choose a reason for hiding this comment

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

Thx! I removed theframework but it said undefined : ExpectEqual. So I think we should import framework . Now I am blocked by this : https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/79771/pull-kubernetes-bazel-build/1147495162553831424
It just doesn't make sense - other packages are doing fine under the framework.

gomega.Expect(scheduledCondition != nil).To(gomega.Equal(true))
gomega.Expect(scheduledCondition.Status).To(gomega.Equal(v1.ConditionTrue))
framework.ExpectEqual(scheduledCondition != nil, true)
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionTrue)
Copy link
Member

Choose a reason for hiding this comment

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

ditto

scheduledPods = append(scheduledPods, pod)
} else {
_, scheduledCondition := podutil.GetPodCondition(&pod.Status, v1.PodScheduled)
gomega.Expect(scheduledCondition != nil).To(gomega.Equal(true))
gomega.Expect(scheduledCondition.Status).To(gomega.Equal(v1.ConditionFalse))
framework.ExpectEqual(scheduledCondition != nil, true)
Copy link
Member

Choose a reason for hiding this comment

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

ditto

gomega.Expect(scheduledCondition != nil).To(gomega.Equal(true))
gomega.Expect(scheduledCondition.Status).To(gomega.Equal(v1.ConditionFalse))
framework.ExpectEqual(scheduledCondition != nil, true)
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionFalse)
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

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

@tealee1992: Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.

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.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jul 6, 2019
@k8s-ci-robot
Copy link
Contributor

@tealee1992: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-node-e2e-containerd 8f7781d link /test pull-kubernetes-node-e2e-containerd
pull-kubernetes-e2e-gce 129152f link /test pull-kubernetes-e2e-gce
pull-kubernetes-node-e2e 129152f link /test pull-kubernetes-node-e2e
pull-kubernetes-bazel-build 4032789 link /test pull-kubernetes-bazel-build
pull-kubernetes-e2e-gce-device-plugin-gpu 4032789 link /test pull-kubernetes-e2e-gce-device-plugin-gpu
pull-kubernetes-bazel-test 4032789 link /test pull-kubernetes-bazel-test
pull-kubernetes-kubemark-e2e-gce-big 4032789 link /test pull-kubernetes-kubemark-e2e-gce-big
pull-kubernetes-e2e-gce-100-performance 4032789 link /test pull-kubernetes-e2e-gce-100-performance
pull-kubernetes-integration 4032789 link /test pull-kubernetes-integration
pull-kubernetes-typecheck 4032789 link /test pull-kubernetes-typecheck
pull-kubernetes-verify 4032789 link /test pull-kubernetes-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@oomichi
Copy link
Member

oomichi commented Jul 26, 2019

@tealee1992 This makes module import a new library code.
So we need to run ./hack/update-bazel.sh and make this PR include the change of BUILD files.

@oomichi
Copy link
Member

oomichi commented Jul 30, 2019

I'd like to make this move forward.
I am happy to see this update in this week, otherwise somebody else will take over.

@oomichi
Copy link
Member

oomichi commented Aug 22, 2019

The original issue has been closed, so now this becomes non-mandatory.

/close

@k8s-ci-robot
Copy link
Contributor

@oomichi: Closed this PR.

In response to this:

The original issue has been closed, so now this becomes non-mandatory.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. 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/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.

None yet

5 participants