Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[fix] Fix the test suite again by adding endpoint references
[fix] Added missing callback
  • Loading branch information
3rd-Eden committed Jan 24, 2013
1 parent 20cffae commit 07f78d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion node.js/lib/client/snapshots.js
Expand Up @@ -54,7 +54,7 @@ Snapshots.prototype.create = function (appName, snapshotName, filename, callback
appName = defaultUser.call(this, appName);
var argv = ['apps'].concat(appName.split('/')).concat(['snapshots', snapshotName]);

return this.upload({ uri: argv, file: filename });
return this.upload({ uri: argv, file: filename }, callback);
};

//
Expand Down
13 changes: 13 additions & 0 deletions node.js/test/commands/apps-test.js
Expand Up @@ -3,6 +3,15 @@ var vows = require('vows'),
nock = require('nock'),
makeApiCall = require('../macros').makeApiCall;

var cloud = [{ drones: 0, provider: 'jitsu', datacenter: 'foobar' }],
endpoints = {
"endpoints": {
"jitsu": {
"foobar": "api.mockjitsu.com"
}
}
};

vows.describe('apps').addBatch(makeApiCall(
'apps list',
function setup () {
Expand Down Expand Up @@ -70,6 +79,10 @@ vows.describe('apps').addBatch(makeApiCall(
nock('https://api.mockjitsu.com')
.post('/apps/tester/myApp/start', {})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
.get('/endpoints')
.reply(200, endpoints, { 'x-powered-by': 'Nodejitsu' })
.get('/apps/tester/myApp/cloud')
.reply(200, cloud, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'apps restart myApp',
Expand Down

0 comments on commit 07f78d2

Please sign in to comment.