From 979c502b7f372a12c1cb3c5cb77ad22f704db923 Mon Sep 17 00:00:00 2001 From: Kavindu Dodanduwa Date: Fri, 11 Aug 2023 10:21:34 -0700 Subject: [PATCH] fix calling to match method signature Signed-off-by: Kavindu Dodanduwa --- go.sum | 2 -- pkg/openfeature/event_executor_test.go | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/go.sum b/go.sum index f8922e67..bfa89e43 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,6 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= diff --git a/pkg/openfeature/event_executor_test.go b/pkg/openfeature/event_executor_test.go index 16e98aca..12220df7 100644 --- a/pkg/openfeature/event_executor_test.go +++ b/pkg/openfeature/event_executor_test.go @@ -1250,15 +1250,15 @@ func TestEventHandler_APIRemoval(t *testing.T) { t.Errorf("expected %d events, but got %d", 3, readyLen) } - if !slices.Contains(executor.apiRegistry[ProviderReady], &h2) { + if !slices.Contains(executor.apiRegistry[ProviderReady], EventCallback(&h2)) { t.Errorf("expected callback to be present") } - if !slices.Contains(executor.apiRegistry[ProviderReady], &h3) { + if !slices.Contains(executor.apiRegistry[ProviderReady], EventCallback(&h3)) { t.Errorf("expected callback to be present") } - if !slices.Contains(executor.apiRegistry[ProviderReady], &h3) { + if !slices.Contains(executor.apiRegistry[ProviderReady], EventCallback(&h4)) { t.Errorf("expected callback to be present") } @@ -1303,15 +1303,15 @@ func TestEventHandler_APIRemoval(t *testing.T) { t.Errorf("expected %d events in client a, but got %d", 3, readyLen) } - if !slices.Contains(executor.scopedRegistry["a"].callbacks[ProviderReady], &h2) { + if !slices.Contains(executor.scopedRegistry["a"].callbacks[ProviderReady], EventCallback(&h2)) { t.Errorf("expected callback to be present") } - if !slices.Contains(executor.scopedRegistry["a"].callbacks[ProviderReady], &h3) { + if !slices.Contains(executor.scopedRegistry["a"].callbacks[ProviderReady], EventCallback(&h3)) { t.Errorf("expected callback to be present") } - if !slices.Contains(executor.scopedRegistry["a"].callbacks[ProviderReady], &h4) { + if !slices.Contains(executor.scopedRegistry["a"].callbacks[ProviderReady], EventCallback(&h4)) { t.Errorf("expected callback to be present") }