Use env var BOX_VERSION in all the tests
..except the update test for now.
This commit is contained in:
parent
28db088de7
commit
4de4309871
@ -80,7 +80,7 @@ function getLatestBoxVersion(callback) {
|
||||
function runTests(latestVersionInfo, callback) {
|
||||
debug('Running tests for %j', latestVersionInfo);
|
||||
|
||||
gNpmTest = shell.system('e2etestrunner', 'npm run-script parallel_test', function (error, stdout, stderr) {
|
||||
gNpmTest = shell.system('e2etestrunner', 'npm run-script parallel_test', { env: [ 'BOX_VERSION=' + latestVersionInfo.version ] }, function (error, stdout, stderr) {
|
||||
gNpmTest = null;
|
||||
debug('Final test result', error);
|
||||
|
||||
|
@ -11,12 +11,12 @@ var AppStore = require('../appstore.js'),
|
||||
assert = require('assert'),
|
||||
Cloudron = require('../cloudron.js'),
|
||||
common = require('../common.js'),
|
||||
request = require('superagent-sync'),
|
||||
semver = require('semver');
|
||||
request = require('superagent-sync');
|
||||
|
||||
require('colors');
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
var BOX_VERSION = process.env.BOX_VERSION;
|
||||
|
||||
describe('Application flow test', function () {
|
||||
this.timeout(0);
|
||||
@ -24,14 +24,7 @@ describe('Application flow test', function () {
|
||||
var appStore = new AppStore('https://api.staging.cloudron.io');
|
||||
|
||||
var owner = common.getOwner();
|
||||
var res, latestVersion, cloudron, appId, box;
|
||||
|
||||
it('can query versions', function () {
|
||||
res = request.get('https://s3.amazonaws.com/staging-cloudron-releases/versions.json').end();
|
||||
common.verifyResponse(res);
|
||||
var boxVersions = Object.keys(res.body).sort(semver.rcompare);
|
||||
latestVersion = boxVersions[0];
|
||||
});
|
||||
var cloudron, appId, box;
|
||||
|
||||
it('can login to the store', function () {
|
||||
var accessToken = appStore.getAccessToken(owner);
|
||||
@ -43,7 +36,7 @@ describe('Application flow test', function () {
|
||||
domain: common.cloudronDomain(__filename),
|
||||
region: 'sfo1',
|
||||
size: '512mb',
|
||||
version: latestVersion
|
||||
version: BOX_VERSION
|
||||
});
|
||||
box = appStore.waitForCloudron(box.id);
|
||||
cloudron = new Cloudron(box);
|
||||
|
@ -13,12 +13,12 @@ var AppStore = require('../appstore.js'),
|
||||
common = require('../common.js'),
|
||||
dnsSync = require('dns-sync'),
|
||||
request = require('superagent-sync'),
|
||||
semver = require('semver'),
|
||||
sleep = require('sleep').sleep;
|
||||
|
||||
require('colors');
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
var BOX_VERSION = process.env.BOX_VERSION;
|
||||
|
||||
describe('Cloudron backup testing', function () {
|
||||
this.timeout(0);
|
||||
@ -26,14 +26,7 @@ describe('Cloudron backup testing', function () {
|
||||
var appStore = new AppStore('https://api.staging.cloudron.io');
|
||||
|
||||
var owner = common.getOwner();
|
||||
var res, latestVersion, cloudron, appId, box, backupInfo;
|
||||
|
||||
it('can query versions', function () {
|
||||
res = request.get('https://s3.amazonaws.com/staging-cloudron-releases/versions.json').end();
|
||||
common.verifyResponse(res);
|
||||
var boxVersions = Object.keys(res.body).sort(semver.rcompare);
|
||||
latestVersion = boxVersions[0];
|
||||
});
|
||||
var cloudron, appId, box, backupInfo;
|
||||
|
||||
it('can login to the store', function () {
|
||||
var accessToken = appStore.getAccessToken(owner);
|
||||
@ -45,7 +38,7 @@ describe('Cloudron backup testing', function () {
|
||||
domain: common.cloudronDomain(__filename),
|
||||
region: 'sfo1',
|
||||
size: '512mb',
|
||||
version: latestVersion
|
||||
version: BOX_VERSION
|
||||
});
|
||||
box = appStore.waitForCloudron(box.id);
|
||||
cloudron = new Cloudron(box);
|
||||
|
@ -10,13 +10,12 @@
|
||||
|
||||
var AppStore = require('../appstore.js'),
|
||||
Cloudron = require('../cloudron.js'),
|
||||
common = require('../common.js'),
|
||||
request = require('superagent-sync'),
|
||||
semver = require('semver');
|
||||
common = require('../common.js');
|
||||
|
||||
require('colors');
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
var BOX_VERSION = process.env.BOX_VERSION;
|
||||
|
||||
describe('Cloudron user creation testing', function () {
|
||||
this.timeout(0);
|
||||
@ -24,14 +23,7 @@ describe('Cloudron user creation testing', function () {
|
||||
var appStore = new AppStore('https://api.staging.cloudron.io');
|
||||
|
||||
var owner = common.getOwner();
|
||||
var res, latestVersion, cloudron, box, newUser;
|
||||
|
||||
it('can query versions', function () {
|
||||
res = request.get('https://s3.amazonaws.com/staging-cloudron-releases/versions.json').end();
|
||||
common.verifyResponse(res);
|
||||
var boxVersions = Object.keys(res.body).sort(semver.rcompare);
|
||||
latestVersion = boxVersions[0];
|
||||
});
|
||||
var cloudron, box, newUser;
|
||||
|
||||
it('can login to the store', function () {
|
||||
var accessToken = appStore.getAccessToken(owner);
|
||||
@ -43,7 +35,7 @@ describe('Cloudron user creation testing', function () {
|
||||
domain: common.cloudronDomain(__filename),
|
||||
region: 'sfo1',
|
||||
size: '512mb',
|
||||
version: latestVersion
|
||||
version: BOX_VERSION
|
||||
});
|
||||
box = appStore.waitForCloudron(box.id);
|
||||
cloudron = new Cloudron(box);
|
||||
|
@ -12,13 +12,12 @@ var AppStore = require('../appstore.js'),
|
||||
async = require('async'),
|
||||
Cloudron = require('../cloudron.js'),
|
||||
common = require('../common.js'),
|
||||
dns = require('dns'),
|
||||
request = require('superagent-sync'),
|
||||
semver = require('semver');
|
||||
dns = require('dns');
|
||||
|
||||
require('colors');
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
var BOX_VERSION = process.env.BOX_VERSION;
|
||||
|
||||
describe('Appstore new user flow', function () {
|
||||
this.timeout(0);
|
||||
@ -26,14 +25,7 @@ describe('Appstore new user flow', function () {
|
||||
var appStore = new AppStore('https://api.staging.cloudron.io');
|
||||
|
||||
var owner = common.getOwner();
|
||||
var res, latestVersion, cloudron, appId, box;
|
||||
|
||||
it('can query versions', function () {
|
||||
res = request.get('https://s3.amazonaws.com/staging-cloudron-releases/versions.json').end();
|
||||
common.verifyResponse(res);
|
||||
var boxVersions = Object.keys(res.body).sort(semver.rcompare);
|
||||
latestVersion = boxVersions[0];
|
||||
});
|
||||
var cloudron, appId, box;
|
||||
|
||||
it('can login to the store', function () {
|
||||
var accessToken = appStore.getAccessToken(owner);
|
||||
@ -54,7 +46,7 @@ describe('Appstore new user flow', function () {
|
||||
domain: common.cloudronDomain(__filename),
|
||||
region: 'sfo1',
|
||||
size: '512mb',
|
||||
version: latestVersion
|
||||
version: BOX_VERSION
|
||||
});
|
||||
box = appStore.waitForCloudron(box.id);
|
||||
cloudron = new Cloudron(box);
|
||||
|
Loading…
Reference in New Issue
Block a user