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

Persist data to disk #1307

Open
silverwind opened this issue Aug 16, 2023 · 1 comment
Open

Persist data to disk #1307

silverwind opened this issue Aug 16, 2023 · 1 comment

Comments

@silverwind
Copy link
Contributor

silverwind commented Aug 16, 2023

For a CLI application that use ioredis, it would be useful to have a way to persist and restore the current ioredis-mock data, so that multiple invocations of the CLI can work with a shared data set. Hypothetical API:

RedisMock.saveDump("file.json")
RedisMock.restoreDump("file.json")
@silverwind
Copy link
Contributor Author

silverwind commented Aug 17, 2023

I think I'll go another route with the CLI testing and avoid the child processes, which is both faster and ioredis-mock data can persists for the lifetime of the testing process.

Leaving this open as such save/restore functionality may still be useful for other use cases.

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

1 participant