mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
chore: omit comparison to bool constant
This commit is contained in:
parent
1c7e87cff2
commit
0da37d8c54
@ -354,7 +354,7 @@ func copyFileLogs(ctx context.Context, w io.Writer, services []string) {
|
|||||||
// in that order stopping on first success.
|
// in that order stopping on first success.
|
||||||
func heuristicsCopyFileLogs(ctx context.Context, w io.Writer, service string) {
|
func heuristicsCopyFileLogs(ctx context.Context, w io.Writer, service string) {
|
||||||
logFileNames := [3]string{
|
logFileNames := [3]string{
|
||||||
fmt.Sprintf("%s", service),
|
service,
|
||||||
fmt.Sprintf("%s.log", service),
|
fmt.Sprintf("%s.log", service),
|
||||||
fmt.Sprintf("%s/%s.log", service, service),
|
fmt.Sprintf("%s/%s.log", service, service),
|
||||||
}
|
}
|
||||||
|
@ -429,7 +429,7 @@ func waitForPodResizeActuation(c clientset.Interface, podClient *e2epod.PodClien
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if verifyPodAllocations(pod, expectedContainers, false) == false {
|
if !verifyPodAllocations(pod, expectedContainers, false) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
return pod, nil
|
return pod, nil
|
||||||
@ -438,7 +438,7 @@ func waitForPodResizeActuation(c clientset.Interface, podClient *e2epod.PodClien
|
|||||||
}
|
}
|
||||||
waitContainerCgroupValuesEqualsExpected := func() error {
|
waitContainerCgroupValuesEqualsExpected := func() error {
|
||||||
for start := time.Now(); time.Since(start) < PollTimeout; time.Sleep(PollInterval) {
|
for start := time.Now(); time.Since(start) < PollTimeout; time.Sleep(PollInterval) {
|
||||||
if verifyPodContainersCgroupValues(patchedPod, expectedContainers, false) == false {
|
if !verifyPodContainersCgroupValues(patchedPod, expectedContainers, false) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -726,7 +726,7 @@ func (v *podStartVerifier) Verify(event watch.Event) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if status := e2epod.FindContainerStatusInPod(pod, "blocked"); status != nil {
|
if status := e2epod.FindContainerStatusInPod(pod, "blocked"); status != nil {
|
||||||
if (status.Started != nil && *status.Started == true) || status.LastTerminationState.Terminated != nil || status.State.Waiting == nil {
|
if (status.Started != nil && *status.Started) || status.LastTerminationState.Terminated != nil || status.State.Waiting == nil {
|
||||||
return fmt.Errorf("pod %s on node %s should not have started the blocked container: %#v", pod.Name, pod.Spec.NodeName, status)
|
return fmt.Errorf("pod %s on node %s should not have started the blocked container: %#v", pod.Name, pod.Spec.NodeName, status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,15 +194,15 @@ func verifyDiskFormat(ctx context.Context, client clientset.Interface, nodeName
|
|||||||
}
|
}
|
||||||
isDiskFormatCorrect := false
|
isDiskFormatCorrect := false
|
||||||
if diskFormat == "eagerzeroedthick" {
|
if diskFormat == "eagerzeroedthick" {
|
||||||
if eagerlyScrub == true && thinProvisioned == false {
|
if eagerlyScrub && !thinProvisioned {
|
||||||
isDiskFormatCorrect = true
|
isDiskFormatCorrect = true
|
||||||
}
|
}
|
||||||
} else if diskFormat == "zeroedthick" {
|
} else if diskFormat == "zeroedthick" {
|
||||||
if eagerlyScrub == false && thinProvisioned == false {
|
if !eagerlyScrub && !thinProvisioned {
|
||||||
isDiskFormatCorrect = true
|
isDiskFormatCorrect = true
|
||||||
}
|
}
|
||||||
} else if diskFormat == "thin" {
|
} else if diskFormat == "thin" {
|
||||||
if eagerlyScrub == false && thinProvisioned == true {
|
if !eagerlyScrub && thinProvisioned {
|
||||||
isDiskFormatCorrect = true
|
isDiskFormatCorrect = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ func findWindowsNode(ctx context.Context, f *framework.Framework) (v1.Node, erro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if foundNode == false {
|
if !foundNode {
|
||||||
e2eskipper.Skipf("Could not find and ready and schedulable Windows nodes")
|
e2eskipper.Skipf("Could not find and ready and schedulable Windows nodes")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user