-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Add a method to TestContext to check if is IPv6 #82060
Conversation
/hold |
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 make the framework clean for me.
/lgtm
/approve
/retest
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, neolit123, 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 |
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.
/lgtm cancel
func ClusterIsIPv6() bool { | ||
return TestContext.IPFamily == "ipv6" | ||
} | ||
|
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.
Due to this change, one of unit tests related to e2elog is failed like
Ran 3 of 3 Specs in 0.022 seconds
FAIL! -- 0 Passed | 3 Failed | 0 Pending | 0 Skipped
--- FAIL: TestFailureOutput (0.04s)
logger_test.go:104:
stack in 1
Expected
<string>: "...o:1364
k8s...."
to equal |
<string>: "...o:1369
k8s...."
FAIL
We need to change test/e2e/framework/log/logger_test.go
like
- stack: "\tutil.go:1369\nk8s.io/kubernetes/test/e2e/framework.ExpectNoError()\n\tutil.go:1363\nk8s.io/kubernetes/test/e2e/framework/log_test.glob..func1.4()\n\tlogger_test.go:49\nk8s.io/kubernetes/vendor/github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync()\n\tlogger_test.go:65\n",
+ stack: "\tutil.go:1364\nk8s.io/kubernetes/test/e2e/framework.ExpectNoError()\n\tutil.go:1359\nk8s.io/kubernetes/test/e2e/framework/log_test.glob..func1.4()\n\tlogger_test.go:49\nk8s.io/kubernetes/vendor/github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync()\n\tlogger_test.go:65\n",
(I faced the same problem on another PR #81685)
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 has to be merged after #82014
:)
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.
Ah, got it :-)
/lgtm |
/retest The PR that fixed the unit test failures was merged |
/test pull-kubernetes-conformance-kind-ipv6 |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This is a followup based on the following conversation
#81750 (comment)
to move the e2e ClusterIsIPv6() function to a method of TestContext
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
This has to be merged after #82014
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: