mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
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.
This commit is contained in:
parent
6d09ab86c2
commit
d8db9640fa
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user