Randomize cloudron names
This commit is contained in:
parent
191f8ca8e9
commit
917319d91a
@ -15,6 +15,11 @@ require('colors');
|
|||||||
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||||
|
|
||||||
|
function cloudronName() {
|
||||||
|
var r = (Math.random() * 1000).toFixed();
|
||||||
|
return 't-' + path.basename(__filename, '-test.js') + '-' + r + '.smartserver.io';
|
||||||
|
}
|
||||||
|
|
||||||
function verifyResponse(res, errorMessage) {
|
function verifyResponse(res, errorMessage) {
|
||||||
if (res.statusCode < 200 || res.statusCode > 299) {
|
if (res.statusCode < 200 || res.statusCode > 299) {
|
||||||
console.log('Response error statusCode:%s error:%s body:%s', res.statusCode, res.error, res.body);
|
console.log('Response error statusCode:%s error:%s body:%s', res.statusCode, res.error, res.body);
|
||||||
@ -50,7 +55,7 @@ describe('Application flow test', function () {
|
|||||||
|
|
||||||
it('can create a cloudron', function () {
|
it('can create a cloudron', function () {
|
||||||
box = appStore.createCloudron({
|
box = appStore.createCloudron({
|
||||||
name: 'testbox-' + path.basename(__filename, '-test.js') + '.smartserver.io',
|
name: cloudronName(),
|
||||||
zoneName: 'smartserver.io',
|
zoneName: 'smartserver.io',
|
||||||
region: 'sfo1',
|
region: 'sfo1',
|
||||||
size: '512mb',
|
size: '512mb',
|
||||||
@ -91,7 +96,8 @@ describe('Application flow test', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('can configure app', function () {
|
it('can configure app', function () {
|
||||||
cloudron.configureApp(appId, location + 'x');
|
location = location + 'x';
|
||||||
|
cloudron.configureApp(appId, location);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can check the addons', function () {
|
it('can check the addons', function () {
|
||||||
|
@ -15,6 +15,11 @@ require('colors');
|
|||||||
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||||
|
|
||||||
|
function cloudronName() {
|
||||||
|
var r = (Math.random() * 1000).toFixed();
|
||||||
|
return 't-' + path.basename(__filename, '-test.js') + '-' + r + '.smartserver.io';
|
||||||
|
}
|
||||||
|
|
||||||
function verifyResponse(res, errorMessage) {
|
function verifyResponse(res, errorMessage) {
|
||||||
if (res.statusCode < 200 || res.statusCode > 299) {
|
if (res.statusCode < 200 || res.statusCode > 299) {
|
||||||
console.log('Response error statusCode:%s error:%s body:%s', res.statusCode, res.error, res.body);
|
console.log('Response error statusCode:%s error:%s body:%s', res.statusCode, res.error, res.body);
|
||||||
@ -50,7 +55,7 @@ describe('Cloudron user creation testing', function () {
|
|||||||
|
|
||||||
it('can create a cloudron', function () {
|
it('can create a cloudron', function () {
|
||||||
box = appStore.createCloudron({
|
box = appStore.createCloudron({
|
||||||
name: 'testbox-' + path.basename(__filename, '-test.js') + '.smartserver.io',
|
name: cloudronName(),
|
||||||
zoneName: 'smartserver.io',
|
zoneName: 'smartserver.io',
|
||||||
region: 'sfo1',
|
region: 'sfo1',
|
||||||
size: '512mb',
|
size: '512mb',
|
||||||
|
@ -15,6 +15,11 @@ require('colors');
|
|||||||
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||||
|
|
||||||
|
function cloudronName() {
|
||||||
|
var r = (Math.random() * 1000).toFixed();
|
||||||
|
return 't-' + path.basename(__filename, '-test.js') + '-' + r + '.smartserver.io';
|
||||||
|
}
|
||||||
|
|
||||||
function verifyResponse(res, errorMessage) {
|
function verifyResponse(res, errorMessage) {
|
||||||
if (res.statusCode < 200 || res.statusCode > 299) {
|
if (res.statusCode < 200 || res.statusCode > 299) {
|
||||||
console.log('Response error statusCode:%s error:%s body:%s', res.statusCode, res.error, res.body);
|
console.log('Response error statusCode:%s error:%s body:%s', res.statusCode, res.error, res.body);
|
||||||
@ -50,7 +55,7 @@ describe('Appstore new user flow', function () {
|
|||||||
|
|
||||||
it('can create a cloudron', function () {
|
it('can create a cloudron', function () {
|
||||||
box = appStore.createCloudron({
|
box = appStore.createCloudron({
|
||||||
name: 'testbox-' + path.basename(__filename, '-test.js') + '.smartserver.io',
|
name: cloudronName(),
|
||||||
zoneName: 'smartserver.io',
|
zoneName: 'smartserver.io',
|
||||||
region: 'sfo1',
|
region: 'sfo1',
|
||||||
size: '512mb',
|
size: '512mb',
|
||||||
@ -75,7 +80,8 @@ describe('Appstore new user flow', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('can configure app', function () {
|
it('can configure app', function () {
|
||||||
cloudron.configureApp(appId, location + 'x');
|
location = location + 'x';
|
||||||
|
cloudron.configureApp(appId, location);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can uninstall app', function () {
|
it('can uninstall app', function () {
|
||||||
|
@ -15,6 +15,11 @@ require('colors');
|
|||||||
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||||
|
|
||||||
|
function cloudronName() {
|
||||||
|
var r = (Math.random() * 1000).toFixed();
|
||||||
|
return 't-' + path.basename(__filename, '-test.js') + '-' + r + '.smartserver.io';
|
||||||
|
}
|
||||||
|
|
||||||
function verifyResponse(res, errorMessage) {
|
function verifyResponse(res, errorMessage) {
|
||||||
if (res.statusCode < 200 || res.statusCode > 299) {
|
if (res.statusCode < 200 || res.statusCode > 299) {
|
||||||
console.log('Response error statusCode:%s error:%s body:%s', res.statusCode, res.error, res.body);
|
console.log('Response error statusCode:%s error:%s body:%s', res.statusCode, res.error, res.body);
|
||||||
@ -53,7 +58,7 @@ describe('Cloudron update testing', function () {
|
|||||||
|
|
||||||
it('can create a cloudron', function () {
|
it('can create a cloudron', function () {
|
||||||
box = appStore.createCloudron({
|
box = appStore.createCloudron({
|
||||||
name: 'testbox-' + path.basename(__filename, '-test.js') + '.smartserver.io',
|
name: cloudronName(),
|
||||||
zoneName: 'smartserver.io',
|
zoneName: 'smartserver.io',
|
||||||
region: 'sfo1',
|
region: 'sfo1',
|
||||||
size: '512mb',
|
size: '512mb',
|
||||||
|
Loading…
Reference in New Issue
Block a user