-
Notifications
You must be signed in to change notification settings - Fork 550
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
Question: How to use redis-rs to test a redis module written in rust? #1164
Comments
I'm not sure what are you asking, but if you want to call an arbitrary
function, you can create a 'Cmd' object with the relevant args.
So, if your module has a 'FOO.SET' command that takes a key and a value,
and you have a connection object 'conn', you'll call it with
'''rs
redis::cmd("FOO.SET").arg(key).arg(val).query(&mut conn)
…On Wed, 24 Apr 2024, 17:31 Ariel Shtul, ***@***.***> wrote:
Is there any example to follow?
If not, can anyone please provide directions?
Cheers
—
Reply to this email directly, view it on GitHub
<#1164>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDEBBQQ3LPMBHUY6BG4QGLY66623AVCNFSM6AAAAABGXBJR6CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DCNBUG44TAOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@nihohit |
You can't, ATM. You can either copy the code to your repo, with the
appropriate attribution, or you can to open a PR to add another crate to
this repo (let's call it redis-test-utils), copy the context code to the
new crate, and consume that crate from your repo's tests.
@jaymell, does that sound reasonable to you?
…On Thu, 25 Apr 2024, 12:27 Ariel Shtul, ***@***.***> wrote:
@nihohit <https://github.com/nihohit>
How do I import the support crate in order to use TestContext?
—
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDEBBXI3DCPRKW6H62UL23Y7DD73AVCNFSM6AAAAABGXBJR6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZWG42TKMJTGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any example to follow?
If not, can anyone please provide directions?
Cheers
The text was updated successfully, but these errors were encountered: