mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 09:57:52 +00:00
cleanup: fix some log and error capitalizations
Part of https://github.com/kubernetes/kubernetes/issues/15863
This commit is contained in:
@@ -326,7 +326,7 @@ func TestSyncReplicaSetDormancy(t *testing.T) {
|
||||
rsSpec.Status.ReadyReplicas = 1
|
||||
rsSpec.Status.AvailableReplicas = 1
|
||||
fakePodControl.Clear()
|
||||
fakePodControl.Err = fmt.Errorf("Fake Error")
|
||||
fakePodControl.Err = fmt.Errorf("fake Error")
|
||||
|
||||
manager.syncReplicaSet(GetKey(rsSpec, t))
|
||||
validateSyncReplicaSet(t, &fakePodControl, 1, 0, 0)
|
||||
@@ -670,7 +670,7 @@ func TestControllerUpdateStatusWithFailure(t *testing.T) {
|
||||
fakeClient := &fake.Clientset{}
|
||||
fakeClient.AddReactor("get", "replicasets", func(action core.Action) (bool, runtime.Object, error) { return true, rs, nil })
|
||||
fakeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) {
|
||||
return true, &apps.ReplicaSet{}, fmt.Errorf("Fake error")
|
||||
return true, &apps.ReplicaSet{}, fmt.Errorf("fake error")
|
||||
})
|
||||
fakeRSClient := fakeClient.AppsV1().ReplicaSets("default")
|
||||
numReplicas := int32(10)
|
||||
@@ -1136,11 +1136,11 @@ func TestPatchPodFails(t *testing.T) {
|
||||
informers.Core().V1().Pods().Informer().GetIndexer().Add(newPod("pod2", rs, v1.PodRunning, nil, false))
|
||||
// let both patches fail. The rs controller will assume it fails to take
|
||||
// control of the pods and requeue to try again.
|
||||
fakePodControl.Err = fmt.Errorf("Fake Error")
|
||||
fakePodControl.Err = fmt.Errorf("fake Error")
|
||||
rsKey := GetKey(rs, t)
|
||||
err := processSync(manager, rsKey)
|
||||
if err == nil || !strings.Contains(err.Error(), "Fake Error") {
|
||||
t.Errorf("expected Fake Error, got %+v", err)
|
||||
if err == nil || !strings.Contains(err.Error(), "fake Error") {
|
||||
t.Errorf("expected fake Error, got %+v", err)
|
||||
}
|
||||
// 2 patches to take control of pod1 and pod2 (both fail).
|
||||
validateSyncReplicaSet(t, fakePodControl, 0, 0, 2)
|
||||
|
Reference in New Issue
Block a user