How can I use in-memory database (i.e Redis) for only HTTP tests?

Hello there, I’ve a question. How can I use a in-memory database(i.e Redis) for only testing data?
I’m using MySQL for back-end but I need to use in-memory database for HTTP Tests to avoid create new MySQL database. I researched this, but I didn’t find this issue for japa in node.js,

Any idea? Thanks.

2 Likes

Since Adonis is using Knex under the hood and Knex does not support Redis…

But Knex supports SQLite, which can be run fully in-memory and it should be just drop-on replacement for most cases

https://www.sqlite.org/inmemorydb.html