You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
some small tweaks to #815, so that we don't use two differnt approaches for spawning redis
This commit is contained in:
@@ -8,8 +8,6 @@ addons:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
services:
|
||||
- redis-server
|
||||
node_js:
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
requirepass porkchopsandwiches
|
||||
port 6378
|
||||
port 6379
|
||||
bind ::1 127.0.0.1
|
||||
unixsocket /tmp/redis.sock
|
||||
unixsocketperm 755
|
||||
|
@@ -1,4 +1,4 @@
|
||||
port 6378
|
||||
port 6379
|
||||
bind ::1 127.0.0.1
|
||||
unixsocket /tmp/redis.sock
|
||||
unixsocketperm 755
|
||||
|
@@ -4,7 +4,7 @@ var redis = require('../../index');
|
||||
|
||||
var config = {
|
||||
redis: redis,
|
||||
PORT: 6378,
|
||||
PORT: 6379,
|
||||
HOST: {
|
||||
IPv4: "127.0.0.1",
|
||||
IPv6: "::1"
|
||||
|
@@ -11,6 +11,17 @@ module.exports = {
|
||||
var confFile = conf || path.resolve(__dirname, '../conf/redis.conf');
|
||||
var rp = cp.spawn("redis-server", [confFile], {});
|
||||
|
||||
// capture a failure booting redis, and give
|
||||
// the user running the test some directions.
|
||||
rp.once("exit", function (code) {
|
||||
if (code !== 0) {
|
||||
console.error('failed to starting redis with exit code "' + code + '" ' +
|
||||
'stop any other redis processes currently running (' +
|
||||
'hint: lsof -i :6379)');
|
||||
process.exit(code)
|
||||
}
|
||||
})
|
||||
|
||||
// wait for redis to become available, by
|
||||
// checking the port we bind on.
|
||||
waitForRedis(true, function () {
|
||||
|
@@ -50,7 +50,7 @@ describe("The node_redis client", function () {
|
||||
});
|
||||
});
|
||||
|
||||
it("connects correctly with defaults values", function (done) {
|
||||
it("connects correctly with default values", function (done) {
|
||||
client = redis.createClient();
|
||||
client.on("error", done);
|
||||
|
||||
@@ -74,7 +74,7 @@ describe("The node_redis client", function () {
|
||||
});
|
||||
});
|
||||
|
||||
it("throws on strange connection infos", function () {
|
||||
it("throws on strange connection info", function () {
|
||||
try {
|
||||
redis.createClient(true);
|
||||
throw new Error('failed');
|
||||
|
Reference in New Issue
Block a user