Fix ecosystem loading
This commit is contained in:
parent
9e23339346
commit
964e688ac8
19
common.js
19
common.js
@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var path = require('path');
|
var path = require('path'),
|
||||||
|
safe = require('safetydance');
|
||||||
|
|
||||||
exports = module.exports = {
|
exports = module.exports = {
|
||||||
TESTAPP_ID: 'io.cloudron.testapp',
|
TESTAPP_ID: 'io.cloudron.testapp',
|
||||||
@ -13,11 +14,9 @@ exports = module.exports = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var gNow = ((new Date()).getTime() / 1000).toFixed();
|
var gNow = ((new Date()).getTime() / 1000).toFixed();
|
||||||
var gEcosystem = null;
|
var gEcosystem = safe.require(path.join(__dirname, '../keys/ci/ecosystem-prod.json'));
|
||||||
try {
|
|
||||||
gEcosystem = require(path.join(__dirname, '../keys/appstore/ecosystem-staging.json'));
|
console.dir(gEcosystem);
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
|
|
||||||
function cloudronDomain(filename) {
|
function cloudronDomain(filename) {
|
||||||
return 't-' + path.basename(filename, '-test.js') + '-' + gNow + '.smartserver.io';
|
return 't-' + path.basename(filename, '-test.js') + '-' + gNow + '.smartserver.io';
|
||||||
@ -33,12 +32,12 @@ function verifyResponse(res, errorMessage) {
|
|||||||
|
|
||||||
function getOwner() {
|
function getOwner() {
|
||||||
return {
|
return {
|
||||||
username: process.env.APPSTORE_USERNAME || gEcosystem.APPSTORE_USERNAME,
|
username: process.env.APPSTORE_USERNAME || gEcosystem.env.APPSTORE_USERNAME,
|
||||||
password: process.env.APPSTORE_PASSWORD || gEcosystem.APPSTORE_PASSWORD,
|
password: process.env.APPSTORE_PASSWORD || gEcosystem.env.APPSTORE_PASSWORD,
|
||||||
email: process.env.APPSTORE_EMAIL || gEcosystem.APPSTORE_EMAIL
|
email: process.env.APPSTORE_EMAIL || gEcosystem.env.APPSTORE_EMAIL
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function stripeSecret() {
|
function stripeSecret() {
|
||||||
return process.env.STRIPE_SECRET;
|
return process.env.STRIPE_SECRET || gEcosystem.env.STRIPE_SECRET;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
"parallel-mocha": "0.0.7",
|
"parallel-mocha": "0.0.7",
|
||||||
"postmark": "^1.0.0",
|
"postmark": "^1.0.0",
|
||||||
"readline-sync": "^1.2.19",
|
"readline-sync": "^1.2.19",
|
||||||
|
"safetydance": "0.0.17",
|
||||||
"semver": "^4.3.6",
|
"semver": "^4.3.6",
|
||||||
"should": "^6.0.3",
|
"should": "^6.0.3",
|
||||||
"sleep": "^2.0.0",
|
"sleep": "^2.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user