From d8db9640fab2a3fc3d493cd748bfbfebe5edca05 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 20 May 2023 22:58:37 +0300 Subject: [PATCH] kubeadm: remove function pointer comparison in phase test TestBindToCommandArgRequirements has a .Pointer() comparison that is not guaranteed to pass given the reflected functions are closures. This test is consistently failing on Go 1.21 rc1. Remove said comparison from the test. --- cmd/kubeadm/app/cmd/phases/workflow/runner_test.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmd/kubeadm/app/cmd/phases/workflow/runner_test.go b/cmd/kubeadm/app/cmd/phases/workflow/runner_test.go index f8c5840ff4e..9c47cd418db 100644 --- a/cmd/kubeadm/app/cmd/phases/workflow/runner_test.go +++ b/cmd/kubeadm/app/cmd/phases/workflow/runner_test.go @@ -401,14 +401,8 @@ func TestBindToCommandArgRequirements(t *testing.T) { continue } - // Ensure it is the expected function - if reflect.ValueOf(cCmd.Args).Pointer() != reflect.ValueOf(args.args).Pointer() { - t.Error("The function pointers where not equal.") - } - // Test passing argument set err := cCmd.Args(cCmd, args.pass) - if err != nil { t.Errorf("command %s should validate the args: %v\n %v", cCmd.Name(), args.pass, err) }