Skip to content

Commit

Permalink
fix calling to match method signature
Browse files Browse the repository at this point in the history
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
  • Loading branch information
Kavindu-Dodan committed Aug 11, 2023
1 parent 88a9b8d commit 979c502
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
12 changes: 6 additions & 6 deletions pkg/openfeature/event_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down Expand Up @@ -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")
}

Expand Down

0 comments on commit 979c502

Please sign in to comment.