This file contains information related with this plugin development
How to run the test suite after checking out this plugin?
Run the unit test suite with the following command:
npm test
The unit test suite is mocking a Redis instance to execute tests and validate parameters and responses are handled correclty. These tests are also automatically executed on every commit to this project.
Integration test suite is running against a real Redis server. How to run it:
- Make sure you have a running Redis instance (running via Docker might be ok https://hub.docker.com/_/redis/)
- Start with Docker:
docker run --name some-redis -d -p 6379:6379 redis
- Start with Docker:
- Create
.env
file in yourtest
directory and set values for the environment variables specified in test/config.js. Note that those variables are sensitive and.env
is added to.gitignore
. Do not change that. - Run the test suite with
npm run test:integration
To validate you Redis server is working fine you may use the Redis CLI available as an NPM module. (https://www.npmjs.com/package/redis-cli)
sudo npm install -g redis-cli
Connect with the following command:
rdcli -h localhost