diff --git a/test/cloudron-update-test.js b/test/cloudron-update-test.js index a560858..47f759b 100644 --- a/test/cloudron-update-test.js +++ b/test/cloudron-update-test.js @@ -30,6 +30,14 @@ describe('Cloudron update testing', function () { var owner = common.getOwner(); var res, fromVersion, toVersion, cloudron, appId, box, nextVersion; + before('can release a fake version to staging', function () { + execSync(__dirname + '/../../installer/release/release rerelease --env staging', { stdio: [ null, process.stdout, process.stderr ] }); + }); + + after('can revert the fake release from staging', function () { + execSync(__dirname + '/../../installer/release/release revert --env staging', { stdio: [ null, process.stdout, process.stderr ] }); + }); + it('can query versions', function () { res = request.get('https://s3.amazonaws.com/staging-cloudron-releases/versions.json').end(); common.verifyResponse(res); @@ -105,10 +113,6 @@ describe('Cloudron update testing', function () { assert.strictEqual(res.body.mongodb, 'OK'); }); - it('can release a fake version to staging', function () { - execSync(__dirname + '/../../installer/release/release rerelease --env staging', { stdio: [ null, process.stdout, process.stderr ] }); - }); - it('can update to new version', function () { console.log('Wait for cloudron to get the update'); sleep(60 * 2); @@ -127,10 +131,6 @@ describe('Cloudron update testing', function () { assert.strictEqual(res.body.mongodb, 'OK'); }); - it('can revert the fake release from staging', function () { - execSync(__dirname + '/../../installer/release/release revert --env staging', { stdio: [ null, process.stdout, process.stderr ] }); - }); - it('can uninstall app', function () { cloudron.uninstallApp(appId); });