Skip to content
Browse files

[test] Removed some tests we dont need.

  • Loading branch information...
1 parent e8a8be4 commit 2c90b257e9e7f25b694a47935d7984137fdb6331 @jfhbrook jfhbrook committed Feb 27, 2012
Showing with 2 additions and 151 deletions.
  1. +2 −63 test/commands/apps-test.js
  2. +0 −30 test/commands/env-test.js
  3. +0 −58 test/commands/snapshots-test.js
View
65 test/commands/apps-test.js
@@ -33,20 +33,6 @@ vows.describe('jitsu/commands/apps').addBatch({
}, { 'x-powered-by': 'Nodejitsu' })
})
}).addBatch({
- 'apps list tester': shouldNodejitsuOk(function setup() {
- nock('http://api.mockjitsu.com')
- .get('/apps/tester')
- .reply(200, {
- apps:[{
- name: 'application',
- state: 'stopped',
- subdomain:'application',
- scripts: { start: './server.js' },
- snapshots: [{ filename: 'FILENAME' }]
- }]
- }, { 'x-powered-by': 'Nodejitsu' })
- })
-}).addBatch({
'apps view application2': shouldNodejitsuOk(function setup() {
nock('http://api.mockjitsu.com')
.get('/apps/tester/application2')
@@ -89,50 +75,7 @@ vows.describe('jitsu/commands/apps').addBatch({
}, { 'x-powered-by': 'Nodejitsu' })
})
})
-
.addBatch({
- 'apps view tester/application2': shouldNodejitsuOk(function setup() {
- nock('http://api.mockjitsu.com')
- .get('/apps/tester/application2')
- .reply(200, {
- app: {
- _id: 'tester/application2',
- name: 'application',
- state: 'stopped',
- subdomain: 'application',
- scripts: { start: './server.js' },
- snapshots: [{
- id: '0.0.0',
- filename: 'FILENAME',
- ctime: 1234567898765,
- }]
- }
- }, { 'x-powered-by': 'Nodejitsu' })
- })
-}).addBatch({
- 'apps start tester/application3': shouldNodejitsuOk(function setup() {
- nock('http://api.mockjitsu.com')
- .post('/apps/tester/application3/start', {})
- .reply(200, '', { 'x-powered-by': 'Nodejitsu' })
- .get('/apps/tester/application3')
- .reply(200, {
- app: {
- state: 'started',
- subdomain: 'application3'
- }
- }, { 'x-powered-by': 'Nodejitsu' })
- })
-}).addBatch({
- 'apps stop tester/application3': shouldNodejitsuOk(function setup() {
- nock('http://api.mockjitsu.com')
- .post('/apps/tester/application3/stop', {})
- .reply(200, '', { 'x-powered-by': 'Nodejitsu' })
- .get('/apps/tester/application3')
- .reply(200, {
- app: { state: 'stopped' }
- }, { 'x-powered-by': 'Nodejitsu' })
- })
-}).addBatch({
'apps view': shouldNodejitsuOk(function setup() {
useAppFixture();
@@ -192,9 +135,7 @@ vows.describe('jitsu/commands/apps').addBatch({
process.chdir(mainDirectory);
assert.ok(!err);
})
-})
-
-.addBatch({
+}).addBatch({
'apps deploy': shouldNodejitsuOk(function setup() {
useAppFixture();
@@ -273,6 +214,4 @@ vows.describe('jitsu/commands/apps').addBatch({
process.chdir(mainDirectory);
assert.ok(!err);
})
-})
-
-.export(module);
+}).export(module);
View
30 test/commands/env-test.js
@@ -61,36 +61,6 @@ vows.describe('jitsu/commands/env').addBatch({
}, { 'x-powered-by': 'Nodejitsu' })
})
}).addBatch({
- 'env list tester/foobar': shouldNodejitsuOk(function setup() {
- nock('http://api.mockjitsu.com')
- .get('/apps/tester/foobar')
- .reply(200, {
- app: {
- name: 'application',
- state: 'stopped',
- env: { foo: 'bar', baz: 'buzz' },
- subdomain:'application',
- scripts: { start: './server.js' },
- snapshots: [{ filename: 'FILENAME' }]
- }
- }, { 'x-powered-by': 'Nodejitsu' })
- })
-}).addBatch({
- 'env list tester/barbaz': shouldNodejitsuOk(function setup() {
- nock('http://api.mockjitsu.com')
- .get('/apps/tester/barbaz')
- .reply(200, {
- app: {
- name: 'barbaz',
- state: 'stopped',
- env: { ping: 'fizz', pong: 'buzz' },
- subdomain:'barbaz',
- scripts: { start: './server.js' },
- snapshots: [{ filename: 'FILENAME' }]
- }
- }, { 'x-powered-by': 'Nodejitsu' })
- })
-}).addBatch({
'env get foo': shouldNodejitsuOk(function setup() {
nock('http://api.mockjitsu.com')
.get('/apps/tester/jitsu')
View
58 test/commands/snapshots-test.js
@@ -78,64 +78,6 @@ vows.describe('jitsu/commands/snapshots').addBatch({
.reply(200, '', { 'x-powered-by': 'Nodejitsu' });
})
}).addBatch({
- 'snapshots list tester/application': shouldNodejitsuOk(function setup() {
- nock('http://api.mockjitsu.com')
- .get('/apps/tester/application/snapshots')
- .reply(200, {
- snapshots: [{
- id: '0.0.0',
- ctime: new Date(),
- md5: 'q34rq43r5t5g4w56t45t'
- }]
- }, { 'x-powered-by': 'Nodejitsu' });
- })
-}).addBatch({
- 'snapshots list tester/application2': shouldNodejitsuOk(function setup() {
- nock('http://api.mockjitsu.com')
- .get('/apps/tester/application2/snapshots')
- .reply(200, {
- snapshots: [{
- id: '0.0.0',
- ctime: new Date(),
- md5: 'q34rq43r5t5g4w56t45t'
- }]
- }, { 'x-powered-by': 'Nodejitsu' });
- })
-}).addBatch({
- 'snapshots activate tester/application2': shouldNodejitsuOk(function setup() {
- jitsu.prompt.override.snapshot = '0.0.0-1';
-
- nock('http://api.mockjitsu.com')
- .get('/apps/tester/application2/snapshots')
- .reply(200, {
- snapshots: [{
- id: '0.0.0-1',
- ctime: new Date(),
- md5: 'q34rq43r5t5g4w56t45t'
- }]
- }, { 'x-powered-by': 'Nodejitsu' })
- .post('/apps/tester/application2/snapshots/0.0.0-1/activate', {})
- .reply(200, '', { 'x-powered-by': 'Nodejitsu' });
- })
-}).addBatch({
- 'snapshots destroy tester/application3': shouldNodejitsuOk(function setup() {
- jitsu.prompt.override.answer = 'yes';
- jitsu.prompt.override.snapshot = '0.0.0-1';
- jitsu.prompt.override.destroy = 'yes';
-
- nock('http://api.mockjitsu.com')
- .get('/apps/tester/application3/snapshots')
- .reply(200, {
- snapshots: [{
- id: '0.0.0-1',
- ctime: new Date(),
- md5: 'q34rq43r5t5g4w56t45t'
- }]
- }, { 'x-powered-by': 'Nodejitsu' })
- .delete('/apps/tester/application3/snapshots/0.0.0-1', {})
- .reply(200, '', { 'x-powered-by': 'Nodejitsu' });
- })
-}).addBatch({
// This tests jitsu's ability to infer the app name.
'snapshots list': shouldNodejitsuOk(function setup() {

0 comments on commit 2c90b25

Please sign in to comment.
Something went wrong with that request. Please try again.