Test localstorage as well

This commit is contained in:
Girish Ramakrishnan 2015-06-16 19:13:17 -07:00
parent f802e45dee
commit 030846a6b5
4 changed files with 19 additions and 3 deletions

7
common.js Normal file
View File

@ -0,0 +1,7 @@
'use strict';
exports = module.exports = {
TESTAPP_ID: 'io.cloudron.testapp',
TESTAPP_VERSION : '1.0.1'
};

View File

@ -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 () {

View File

@ -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 () {

View File

@ -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);
});