mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-16 07:13:53 +00:00
e2e-framework: code cleanup for mismatched comments
This commit is contained in:
parent
2e306e9632
commit
4d2ff08bfa
@ -59,7 +59,7 @@ func CreateJob(ctx context.Context, c clientset.Interface, ns string, job *batch
|
||||
return c.BatchV1().Jobs(ns).Create(ctx, job, metav1.CreateOptions{})
|
||||
}
|
||||
|
||||
// CreateJob uses c to update a job in namespace ns. If the returned error is
|
||||
// UpdateJob uses c to update a job in namespace ns. If the returned error is
|
||||
// nil, the returned Job is valid and has been updated.
|
||||
func UpdateJob(ctx context.Context, c clientset.Interface, ns string, job *batchv1.Job) (*batchv1.Job, error) {
|
||||
return c.BatchV1().Jobs(ns).Update(ctx, job, metav1.UpdateOptions{})
|
||||
|
@ -49,7 +49,7 @@ func NewKubectlCommand(namespace string, args ...string) *KubectlBuilder {
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEnv appends the given environment and returns itself.
|
||||
// AppendEnv appends the given environment and returns itself.
|
||||
func (b *KubectlBuilder) AppendEnv(env []string) *KubectlBuilder {
|
||||
if b.cmd.Env == nil {
|
||||
b.cmd.Env = os.Environ()
|
||||
|
@ -44,7 +44,7 @@ const (
|
||||
// Taken from k8s.io/kubernetes/pkg/kubelet/metrics
|
||||
podStartDurationKey = "pod_start_duration_seconds"
|
||||
// Taken from k8s.io/kubernetes/pkg/kubelet/metrics
|
||||
PodStartSLIDurationKey = "pod_start_sli_duration_seconds"
|
||||
podStartSLIDurationKey = "pod_start_sli_duration_seconds"
|
||||
// Taken from k8s.io/kubernetes/pkg/kubelet/metrics
|
||||
cgroupManagerOperationsKey = "cgroup_manager_duration_seconds"
|
||||
// Taken from k8s.io/kubernetes/pkg/kubelet/metrics
|
||||
@ -155,7 +155,7 @@ func GetDefaultKubeletLatencyMetrics(ms KubeletMetrics) KubeletLatencyMetrics {
|
||||
podWorkerDurationKey,
|
||||
podWorkerStartDurationKey,
|
||||
podStartDurationKey,
|
||||
PodStartSLIDurationKey,
|
||||
podStartSLIDurationKey,
|
||||
cgroupManagerOperationsKey,
|
||||
dockerOperationsLatencyKey,
|
||||
podWorkerStartDurationKey,
|
||||
|
@ -55,7 +55,7 @@ func NewRuntimeClassPod(runtimeClassName string) *v1.Pod {
|
||||
}
|
||||
}
|
||||
|
||||
// Check if test-handler is configured by reading the configuration from container runtime config.
|
||||
// NodeSupportsPreconfiguredRuntimeClassHandler checks if test-handler is configured by reading the configuration from container runtime config.
|
||||
// If no error is returned, the container runtime is assumed to support the test-handler, otherwise an error will be returned.
|
||||
func NodeSupportsPreconfiguredRuntimeClassHandler(ctx context.Context, f *framework.Framework) error {
|
||||
node, err := e2enode.GetRandomReadySchedulableNode(ctx, f.ClientSet)
|
||||
|
@ -331,7 +331,7 @@ func removeString(slice []string, s string) []string {
|
||||
return newSlice
|
||||
}
|
||||
|
||||
// RemovePodFinalizer removes the pod's finalizer
|
||||
// RemoveFinalizer removes the pod's finalizer
|
||||
func (c *PodClient) RemoveFinalizer(ctx context.Context, podName string, finalizerName string) {
|
||||
framework.Logf("Removing pod's %q finalizer: %q", podName, finalizerName)
|
||||
c.Update(ctx, podName, func(pod *v1.Pod) {
|
||||
|
@ -541,7 +541,7 @@ func WaitForPodNotFoundInNamespace(ctx context.Context, c clientset.Interface, p
|
||||
return nil
|
||||
}
|
||||
|
||||
// PodsResponding waits for the pods to response.
|
||||
// WaitForPodsResponding waits for the pods to response.
|
||||
func WaitForPodsResponding(ctx context.Context, c clientset.Interface, ns string, controllerName string, wantName bool, timeout time.Duration, pods *v1.PodList) error {
|
||||
if timeout == 0 {
|
||||
timeout = podRespondingTimeout
|
||||
|
@ -620,7 +620,7 @@ func generateWriteCmd(content, path string) []string {
|
||||
return commands
|
||||
}
|
||||
|
||||
// generateReadBlockCmd generates the corresponding command lines to read from a block device with the given file path.
|
||||
// GenerateReadBlockCmd generates the corresponding command lines to read from a block device with the given file path.
|
||||
func GenerateReadBlockCmd(fullPath string, numberOfCharacters int) []string {
|
||||
var commands []string
|
||||
commands = []string{"head", "-c", strconv.Itoa(numberOfCharacters), fullPath}
|
||||
|
Loading…
Reference in New Issue
Block a user