compare the func with .Pointer() in scheduler registry-test

Signed-off-by: pacoxu <paco.xu@daocloud.io>
This commit is contained in:
pacoxu 2021-05-06 18:27:23 +08:00
parent add13090e2
commit be0f192acd

View File

@ -76,7 +76,7 @@ func TestDecodeInto(t *testing.T) {
func isRegistryEqual(registryX, registryY Registry) bool {
for name, pluginFactory := range registryY {
if val, ok := registryX[name]; ok {
if reflect.ValueOf(pluginFactory) != reflect.ValueOf(val) {
if reflect.ValueOf(pluginFactory).Pointer() != reflect.ValueOf(val).Pointer() {
// pluginFactory functions are not the same.
return false
}