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 unused functions & types in test/e2e/framework/util.go #76631
remove unused functions & types in test/e2e/framework/util.go #76631
Conversation
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewsykim 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 |
/priority important-longterm |
/hold |
/assign @neolit123 @johnSchnake @stevesloka @oomichi |
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
/uncc |
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.
👍 Nothing like deleted code :)
If you can delete stuff and it still passes tests, no reason to complain. 💯
/hold cancel |
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.
confirmed everything is fine for me, thanks.
/lgtm
} | ||
|
||
// GetServerArchitecture fetches the architecture of the cluster's apiserver. | ||
func GetServerArchitecture(c clientset.Interface) string { |
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.
@@ -362,12 +335,6 @@ func SkipIfMultizone(c clientset.Interface) { | |||
} | |||
} | |||
|
|||
func SkipUnlessClusterMonitoringModeIs(supportedMonitoring ...string) { |
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.
@@ -386,22 +353,6 @@ func SkipUnlessNodeOSDistroIs(supportedNodeOsDistros ...string) { | |||
} | |||
} | |||
|
|||
func SkipUnlessSecretExistsAfterWait(c clientset.Interface, name, namespace string, timeout time.Duration) { |
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.
@@ -443,15 +394,6 @@ func ProviderIs(providers ...string) bool { | |||
return false | |||
} | |||
|
|||
func ClusterMonitoringModeIs(monitoringModes ...string) bool { |
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.
SkipUnlessClusterMonitoringModeIs is only caller as https://cs.k8s.io/?q=ClusterMonitoringModeIs&i=nope&files=&repos=kubernetes/kubernetes and that is removed as the above.
// WaitForPodsSuccess waits till all labels matching the given selector enter | ||
// the Success state. The caller is expected to only invoke this method once the | ||
// pods have been created. | ||
func WaitForPodsSuccess(c clientset.Interface, ns string, successPodLabels map[string]string, timeout time.Duration) error { |
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.
|
||
// KubectlVersionGTE returns true if the kubectl version is greater than or | ||
// equal to v. | ||
func KubectlVersionGTE(v *utilversion.Version) (bool, error) { |
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.
as https://cs.k8s.io/?q=KubectlVersionGTE&i=nope&files=&repos=kubernetes/kubernetes SkipUnlessKubectlVersionGTE is only caller and that is removed on the above.
@@ -3358,40 +3195,6 @@ func isNotRestartAlwaysMirrorPod(p *v1.Pod) bool { | |||
return p.Spec.RestartPolicy != v1.RestartPolicyAlways | |||
} | |||
|
|||
// Waits for the number of events on the given object to reach a desired count. | |||
func WaitForEvents(c clientset.Interface, ns string, objOrRef runtime.Object, desiredEventsCount int) error { |
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.
} | ||
|
||
// Waits for the number of events on the given object to be at least a desired count. | ||
func WaitForPartialEvents(c clientset.Interface, ns string, objOrRef runtime.Object, atLeastEventsCount int) error { |
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.
// as the target for networking connectivity checks. The ip address | ||
// of the created pod will be returned if the pod is launched | ||
// successfully. | ||
func LaunchWebserverPod(f *Framework, podName, nodeName string) (ip string) { |
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.
@@ -4660,24 +4428,6 @@ func parseSystemdServices(services string) string { | |||
return strings.TrimSpace(strings.Replace(services, ",", " ", -1)) | |||
} | |||
|
|||
func UpdatePodWithRetries(client clientset.Interface, ns, name string, update func(*v1.Pod)) (*v1.Pod, error) { |
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.
Thanks for the thorough check @oomichi!! |
Signed-off-by: Andrew Sy Kim kiman@vmware.com
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
First pass at cleaning up test/e2e/framework/util.go as part of #76206. Longer term we're trying to split up test/e2e/framework/util.go into separate packages for better discovery/readability. This PR is just a first pass to remove any methods/functions/structs that aren't being used.
Which issue(s) this PR fixes:
Part of #76206
Special notes for your reviewer:
Does this PR introduce a user-facing change?: