added server tests

This commit is contained in:
Abhinav Adduri 2017-07-11 12:47:40 -07:00
parent 6181ea6463
commit cdf45de8e2
8 changed files with 276 additions and 13 deletions

View file

@ -31,6 +31,8 @@ if (conf.s3_bucket) {
delete: awsDelete,
forceDelete: awsForceDelete,
ping: awsPing,
flushall: flushall,
quit: quit,
metadata
};
} else {
@ -45,10 +47,20 @@ if (conf.s3_bucket) {
delete: localDelete,
forceDelete: localForceDelete,
ping: localPing,
flushall: flushall,
quit: quit,
metadata
};
}
function flushall() {
redis_client.flushdb();
}
function quit() {
redis_client.quit();
}
function metadata(id) {
return new Promise((resolve, reject) => {
redis_client.hgetall(id, (err, reply) => {