From 42d56e9432f4b58d0eb05c635582548137854031 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 20 Oct 2015 20:46:24 -0700 Subject: [PATCH] Make update test use the older version of app --- cloudron.js | 12 +++--------- common.js | 1 + test/cloudron-update-test.js | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/cloudron.js b/cloudron.js index d2a4e44..c49e91f 100644 --- a/cloudron.js +++ b/cloudron.js @@ -315,15 +315,9 @@ Cloudron.prototype.checkAddons = function (location, owner) { try { assert.strictEqual(res.statusCode, 200); - assert.strictEqual(res.body.mysql, 'OK'); - assert.strictEqual(res.body.postgresql, 'OK'); - assert.strictEqual(res.body.mongodb, 'OK'); - assert.strictEqual(res.body.localstorage, 'OK'); - assert.strictEqual(res.body.ldap, 'OK'); - assert.strictEqual(res.body.sendmail, 'OK'); - assert.strictEqual(res.body.redis, 'OK'); - assert.strictEqual(res.body.simpleauth, 'OK'); - assert.strictEqual(res.body.scheduler, 'OK'); + for (var addon in res.body) { + assert.strictEqual(res.body[addon], 'OK'); + } return; } catch (e) { diff --git a/common.js b/common.js index fc576cb..4eca565 100644 --- a/common.js +++ b/common.js @@ -8,6 +8,7 @@ var debug = require('debug')('e2e:common'), exports = module.exports = { TESTAPP_ID: 'io.cloudron.testapp', + PREV_TESTAPP_VERSION : '8.0.0', TESTAPP_VERSION : '9.0.0', cloudronDomain: cloudronDomain, diff --git a/test/cloudron-update-test.js b/test/cloudron-update-test.js index 6368ede..c65c9ef 100644 --- a/test/cloudron-update-test.js +++ b/test/cloudron-update-test.js @@ -77,7 +77,7 @@ describe('Cloudron update testing', function () { var location = 'test' + (Math.random() * 10000).toFixed(); it('can install app', function () { - var manifest = appStore.getManifest(common.TESTAPP_ID, common.TESTAPP_VERSION); + var manifest = appStore.getManifest(common.TESTAPP_ID, common.PREV_TESTAPP_VERSION); appId = cloudron.installApp(location, manifest, fromVersion); });