Skip to content

Commit 380ee46

Browse files
committed
tests: fix mock matcher
1 parent b8511b2 commit 380ee46

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test/envtest/konnect_entities_kongconsumer_test.go

+7-8
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,13 @@ func TestKongConsumerSecretCredentials(t *testing.T) {
488488
sdk.KongCredentialsBasicAuthSDK.EXPECT().
489489
CreateBasicAuthWithConsumer(
490490
mock.Anything,
491-
mock.Anything,
492-
// mock.MatchedBy(
493-
// func(r sdkkonnectops.CreateBasicAuthWithConsumerRequest) bool {
494-
// return r.ControlPlaneID == cp.GetKonnectID() &&
495-
// r.BasicAuthWithoutParents.Username == username &&
496-
// r.BasicAuthWithoutParents.Password == "password"
497-
// },
498-
// ),
491+
mock.MatchedBy(
492+
func(r sdkkonnectops.CreateBasicAuthWithConsumerRequest) bool {
493+
return r.ControlPlaneID == cp.GetKonnectID() &&
494+
r.BasicAuthWithoutParents.Username == username &&
495+
r.BasicAuthWithoutParents.Password == "password"
496+
},
497+
),
499498
).
500499
Return(
501500
&sdkkonnectops.CreateBasicAuthWithConsumerResponse{

0 commit comments

Comments
 (0)