diff --git a/common.js b/common.js new file mode 100644 index 0000000..42b7690 --- /dev/null +++ b/common.js @@ -0,0 +1,7 @@ +'use strict'; + +exports = module.exports = { + TESTAPP_ID: 'io.cloudron.testapp', + TESTAPP_VERSION : '1.0.1' +}; + diff --git a/test/app-flow-test.js b/test/app-flow-test.js index 9eee44f..2386e26 100644 --- a/test/app-flow-test.js +++ b/test/app-flow-test.js @@ -10,6 +10,7 @@ var AppStore = require('../appstore.js'), assert = require('assert'), Cloudron = require('../cloudron.js'), + common = require('../common.js'), path = require('path'), readlineSync = require('readline-sync'), request = require('superagent-sync'), @@ -81,7 +82,7 @@ describe('Application flow test', function () { var location = 'test' + (Math.random() * 10000).toFixed(); it('can install app', function () { - var manifest = appStore.getManifest('io.cloudron.testapp', '1.0.0'); + var manifest = appStore.getManifest(common.TESTAPP_ID, common.TESTAPP_VERSION); appId = cloudron.installApp(location, manifest); }); @@ -91,6 +92,7 @@ describe('Application flow test', function () { assert.strictEqual(res.body.mysql, 'OK'); assert.strictEqual(res.body.postgresql, 'OK'); assert.strictEqual(res.body.mongodb, 'OK'); + assert.strictEqual(res.body.localstorage, 'OK'); }); it('can check the addons', function () { @@ -99,6 +101,7 @@ describe('Application flow test', function () { assert.strictEqual(res.body.mysql, 'OK'); assert.strictEqual(res.body.postgresql, 'OK'); assert.strictEqual(res.body.mongodb, 'OK'); + assert.strictEqual(res.body.localstorage, 'OK'); }); it('can configure app', function () { @@ -112,6 +115,7 @@ describe('Application flow test', function () { assert.strictEqual(res.body.mysql, 'OK'); assert.strictEqual(res.body.postgresql, 'OK'); assert.strictEqual(res.body.mongodb, 'OK'); + assert.strictEqual(res.body.localstorage, 'OK'); }); it('can uninstall app', function () { diff --git a/test/cloudron-backup-test.js b/test/cloudron-backup-test.js index f57e2cd..60a7ef7 100644 --- a/test/cloudron-backup-test.js +++ b/test/cloudron-backup-test.js @@ -10,6 +10,7 @@ var AppStore = require('../appstore.js'), assert = require('assert'), Cloudron = require('../cloudron.js'), + common = require('../common.js'), path = require('path'), readlineSync = require('readline-sync'), request = require('superagent-sync'), @@ -82,7 +83,7 @@ describe('Cloudron backup testing', function () { var location = 'test' + (Math.random() * 10000).toFixed(); it('can install app', function () { - var manifest = appStore.getManifest('io.cloudron.testapp', '1.0.0'); + var manifest = appStore.getManifest(common.TESTAPP_ID, common.TESTAPP_VERSION); appId = cloudron.installApp(location, manifest); }); @@ -92,6 +93,7 @@ describe('Cloudron backup testing', function () { assert.strictEqual(res.body.mysql, 'OK'); assert.strictEqual(res.body.postgresql, 'OK'); assert.strictEqual(res.body.mongodb, 'OK'); + assert.strictEqual(res.body.localstorage, 'OK'); }); it('can check the addons', function () { @@ -100,6 +102,7 @@ describe('Cloudron backup testing', function () { assert.strictEqual(res.body.mysql, 'OK'); assert.strictEqual(res.body.postgresql, 'OK'); assert.strictEqual(res.body.mongodb, 'OK'); + assert.strictEqual(res.body.localstorage, 'OK'); }); it('can backup the box', function () { @@ -131,6 +134,7 @@ describe('Cloudron backup testing', function () { assert.strictEqual(res.body.mysql, 'OK'); assert.strictEqual(res.body.postgresql, 'OK'); assert.strictEqual(res.body.mongodb, 'OK'); + assert.strictEqual(res.body.localstorage, 'OK'); }); it('can uninstall app', function () { diff --git a/test/cloudron-update-test.js b/test/cloudron-update-test.js index 1ae3e84..23d424e 100644 --- a/test/cloudron-update-test.js +++ b/test/cloudron-update-test.js @@ -12,6 +12,7 @@ var AppStore = require('../appstore.js'), assert = require('assert'), Cloudron = require('../cloudron.js'), + common = require('../common.js'), execSync = require('child_process').execSync, path = require('path'), readlineSync = require('readline-sync'), @@ -89,7 +90,7 @@ describe('Cloudron update testing', function () { var location = 'test' + (Math.random() * 10000).toFixed(); it('can install app', function () { - var manifest = appStore.getManifest('io.cloudron.testapp', '1.0.0'); + var manifest = appStore.getManifest(common.TESTAPP_ID, common.TESTAPP_VERSION); appId = cloudron.installApp(location, manifest); });