Replace sleep node module with execSync(sleep)

This commit is contained in:
Johannes Zellner 2016-06-30 16:18:10 +02:00
parent 8102ee1aad
commit 0ad8e9f526
9 changed files with 13 additions and 12 deletions

View File

@ -3,7 +3,7 @@
var common = require('./common.js'),
debug = require('debug')('e2e:appstore'),
request = require('superagent-sync'),
sleep = require('sleep').sleep,
sleep = require('./shell.js').sleep,
stripe = require('stripe');
exports = module.exports = AppStore;

View File

@ -12,7 +12,7 @@ var assert = require('assert'),
once = require('once'),
request = require('superagent-sync'),
smtpTransport = require('nodemailer-smtp-transport'),
sleep = require('sleep').sleep,
sleep = require('./shell.js').sleep,
tls = require('tls'),
url = require('url'),
util = require('util');

View File

@ -30,7 +30,6 @@
"safetydance": "0.0.17",
"semver": "^4.3.6",
"should": "^6.0.3",
"sleep": "^3.0.0",
"stripe": "^3.5.0",
"superagent": "^1.2.0",
"superagent-sync": "^0.2.0",

View File

@ -1,6 +1,7 @@
'use strict';
exports = module.exports = {
sleep: sleep,
sudo: sudo,
exec: exec,
system: system
@ -14,6 +15,10 @@ var assert = require('assert'),
var SUDO = '/usr/bin/sudo';
function sleep(timeout) {
child_process.execSync('sleep ' + timeout);
}
function exec(tag, file, args, options, callback) {
assert.strictEqual(typeof tag, 'string');
assert.strictEqual(typeof file, 'string');

View File

@ -14,7 +14,7 @@ var AppStore = require('../appstore.js'),
mailer = require('../mailer.js'),
request = require('superagent-sync'),
semver = require('semver'),
sleep = require('sleep').sleep;
sleep = require('../shell.js').sleep;
require('colors');

View File

@ -12,7 +12,7 @@ var AppStore = require('../appstore.js'),
dnsSync = require('dns-sync'),
ImapProbe = require('../imap-probe.js'),
mailer = require('../mailer.js'),
sleep = require('sleep').sleep,
sleep = require('../shell.js').sleep,
_ = require('underscore');
require('colors');
@ -33,7 +33,7 @@ describe('Cloudron backup testing', function () {
user: process.env.IMAP_USERNAME,
password: process.env.IMAP_PASSWORD,
host: process.env.IMAP_HOST,
port: 993, // imap port
port: 993, // imap port
tls: true,
readOnly: true
});

View File

@ -6,12 +6,10 @@
var AppStore = require('../appstore.js'),
assert = require('assert'),
async = require('async'),
Cloudron = require('../cloudron.js'),
common = require('../common.js'),
dns = require('dns'),
request = require('superagent-sync'),
sleep = require('sleep').sleep;
sleep = require('../shell.js').sleep;
require('colors');
@ -25,7 +23,7 @@ describe('Appstore button', function () {
var owner = common.getOwner();
var admin = common.getAdmin();
var cloudron, appId, box;
var cloudron, box;
it('can login to the store', function () {
var accessToken = appStore.getAccessToken(owner);

View File

@ -13,7 +13,7 @@ var AppStore = require('../appstore.js'),
common = require('../common.js'),
request = require('superagent-sync'),
semver = require('semver'),
sleep = require('sleep').sleep;
sleep = require('../shell.js').sleep;
require('colors');

View File

@ -8,7 +8,6 @@
var AppStore = require('../appstore.js'),
assert = require('assert'),
async = require('async'),
AWS = require('aws-sdk'),
child_process = require('child_process'),
Cloudron = require('../cloudron.js'),