Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(kv): create mock client for counting func calls #618

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

NickAnge
Copy link
Contributor

@NickAnge NickAnge commented Nov 14, 2024

What this PR does:

This PR creates a MockCountingClient, which wraps the kv.client and can be use in order to count calls at specific functions of the interface.

This will be used here for testing purposes

Which issue(s) this PR fixes:

Fixes #

Checklist

  • Tests updated
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

kv/mock.go Outdated Show resolved Hide resolved
@NickAnge NickAnge force-pushed the nickange/kv/test-add-custom-mock-client branch 2 times, most recently from c794533 to 3b9b7b9 Compare November 14, 2024 18:19
@NickAnge NickAnge marked this pull request as ready for review November 14, 2024 18:20
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one small change.

kv/mock.go Outdated Show resolved Hide resolved
@NickAnge NickAnge force-pushed the nickange/kv/test-add-custom-mock-client branch from 3b9b7b9 to 3b5ceaa Compare November 14, 2024 18:35
@NickAnge NickAnge force-pushed the nickange/kv/test-add-custom-mock-client branch from 3b5ceaa to 9e8cce4 Compare November 14, 2024 18:35
@NickAnge NickAnge merged commit f2a7eb3 into main Nov 15, 2024
5 checks passed
@NickAnge NickAnge deleted the nickange/kv/test-add-custom-mock-client branch November 15, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants