We are using redis python client to start a local redis server for unit testing. Sample code here:
r = StrictRedis(host="localhost", port=6379)
try:
r.ping()
except ConnectionError:
subprocess.Popen("./redis-server")
We want to change a redis config to allow us to run unit tests correctly. Since these unit tests run on AWS Lambda, we don't have direct access to the redis-cli to make any permanent config change.
Is there any way to change redis configuration in the python code?
Note: We are not using any redis.conf for unit test. But if there is a solution using that, we can try that too.