Skip to content

Commit c4cecc7

Browse files
Merge pull request #20206 from jim-minter/310unitfixes
fix unit test breakage in release-3.10
2 parents f71a2e8 + 7af5a25 commit c4cecc7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pkg/apps/strategy/recreate/recreate_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func TestRecreate_deploymentPreHookFail(t *testing.T) {
221221
}
222222

223223
if len(controllerClient.scaleEvents) > 0 {
224-
t.Fatalf("unexpected scaling events: %d", controllerClient.scaleEvents)
224+
t.Fatalf("unexpected scaling events: %v", controllerClient.scaleEvents)
225225
}
226226
}
227227

@@ -253,7 +253,7 @@ func TestRecreate_deploymentMidHookSuccess(t *testing.T) {
253253
}
254254

255255
if len(controllerClient.scaleEvents) > 0 {
256-
t.Fatalf("unexpected scaling events: %d", controllerClient.scaleEvents)
256+
t.Fatalf("unexpected scaling events: %v", controllerClient.scaleEvents)
257257
}
258258
}
259259

@@ -405,10 +405,10 @@ func TestRecreate_acceptorSuccessWithColdCaches(t *testing.T) {
405405
if len(controllerClient.scaleEvents) != 2 {
406406
t.Fatalf("expected 2 scale calls, got %d", len(controllerClient.scaleEvents))
407407
}
408-
if r := controllerClient.scaleEvents[0]; r.Spec.Replicas != 1 {
408+
if r := controllerClient.scaleEvents[0].Spec.Replicas; r != 1 {
409409
t.Errorf("expected first scale event to be 1 replica, got %d", r)
410410
}
411-
if r := controllerClient.scaleEvents[1]; r.Spec.Replicas != 2 {
411+
if r := controllerClient.scaleEvents[1].Spec.Replicas; r != 2 {
412412
t.Errorf("expected second scale event to be 2 replica, got %d", r)
413413
}
414414
}
@@ -445,6 +445,6 @@ func TestRecreate_acceptorFail(t *testing.T) {
445445
t.Fatalf("expected 1 scale calls, got %d", len(rcClient.scaleEvents))
446446
}
447447
if r := rcClient.scaleEvents[0]; r.Spec.Replicas != 1 {
448-
t.Errorf("expected first scale event to be 1 replica, got %d", r)
448+
t.Errorf("expected first scale event to be 1 replica, got %v", r)
449449
}
450450
}

pkg/cmd/server/start/start_node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func execKubelet(kubeletArgs []string) error {
419419
for i, s := range os.Args {
420420
if s == "--vmodule" {
421421
if i+1 < len(os.Args) {
422-
args = append(args, fmt.Sprintf("--vmodule=", os.Args[i+1]))
422+
args = append(args, fmt.Sprintf("--vmodule=%q", os.Args[i+1]))
423423
break
424424
}
425425
}

vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)