fix test of Node

This commit is contained in:
jysperm
2014-12-19 19:52:05 +08:00
parent 6a1bf250ab
commit 540bd541df
5 changed files with 13 additions and 2 deletions

View File

@@ -2,6 +2,8 @@
{config, logger} = app
{available_plugins} = config.plugin
id_key = fs.readFileSync config.ssh.id_key
module.exports = class Node
name: ''
master: false
@@ -117,7 +119,7 @@ module.exports = class Node
connection.connect
host: @info.host
username: 'rpadmin'
privateKey: fs.readFileSync '/home/rpadmin/.ssh/id_rsa'
privateKey: id_key
runCommandRemote: (command, callback) ->
@execRemote command, {}, callback

View File

@@ -49,6 +49,9 @@ module.exports =
billing: {}
ssh:
id_key: '/home/rpadmin/.ssh/id_rsa'
nodes:
master:
host: 'localhost'

View File

@@ -58,6 +58,9 @@ module.exports =
price: 10 / 30
prepaid: true
ssh:
id_key: '/home/rpadmin/.ssh/id_rsa'
nodes:
master:
host: 'localhost'

View File

@@ -46,6 +46,9 @@ module.exports =
bucket: 100 * 1000 * 1000
price: 0.06
ssh:
id_key: '/home/rpadmin/.ssh/id_rsa'
nodes:
master:
host: 'localhost'

View File

@@ -40,8 +40,8 @@ config.web.listen = 12558
if process.env.TRAVIS == 'true'
config.mongodb.user = undefined
config.mongodb.password = undefined
config.redis.password = undefined
config.ssh.id_key = '/home/travis-ci/.ssh/id_rsa'
global.isPluginEnable = (name) ->
return name in config.plugin.available_plugins