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

Faking redisearch-py? (mocking) #104

Open
kingbuzzman opened this issue Nov 2, 2020 · 3 comments
Open

Faking redisearch-py? (mocking) #104

kingbuzzman opened this issue Nov 2, 2020 · 3 comments

Comments

@kingbuzzman
Copy link

We have a pretty complicated setup currently, and to speed up our tests we would like to mock redis + redisearch. Do you know of any preexisting library that does it? We looked into fakeredis, issue is that all of the FT.* commands fail. I've reached out to the maintainer to see if he'd be interested in hosting the project there if there is no current alternative.

@ashtul
Copy link
Contributor

ashtul commented Nov 3, 2020

@kingbuzzman - what are you trying to mock?
You can use FT.EXPLAIN to check that your FT.SEARCH and FT.AGGREGATE commands do not have any syntactic errors.

@kingbuzzman
Copy link
Author

We're looking to make a fake redis server + redisearch to be able to run all our tests and most importantly run them in parallel and not have them interfere with one another.

Another valid option is to spawn a couple of redis server + redisearch module attach them to individual tests and run them in parallel, then turn them off when done.

@gkorland
Copy link
Contributor

gkorland commented Nov 5, 2020

You don't have to create a different server for each test, you can also create a different index for each test.

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

No branches or pull requests

3 participants