From 93cc27396ec504dff9c522f5167428e53ac55910 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Fri, 24 Nov 2017 05:58:37 -0600 Subject: [PATCH] test: fix SIG tests --- package.json | 3 ++- test/cli/daemon.js | 15 ++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 762e9a9ef2..1ef3ba462a 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,8 @@ "temp": "~0.8.3", "through2": "^2.0.3", "update-notifier": "^2.3.0", - "yargs": "^10.0.3" + "yargs": "^10.0.3", + "yargs-parser": "^8.0.0" }, "optionalDependencies": { "prom-client": "^10.2.2", diff --git a/test/cli/daemon.js b/test/cli/daemon.js index 9fcb9bd995..2a94508b6c 100644 --- a/test/cli/daemon.js +++ b/test/cli/daemon.js @@ -71,9 +71,8 @@ describe('daemon', () => { afterEach(() => clean(repoPath)) - // TODO: test fails - it.skip('do not crash if Addresses.Swarm is empty', function (done) { - this.timeout(20 * 1000) + it('do not crash if Addresses.Swarm is empty', function (done) { + this.timeout(100 * 1000) ipfs('init').then(() => { return ipfs('config', 'Addresses', JSON.stringify({ @@ -88,18 +87,16 @@ describe('daemon', () => { }).catch((err) => done(err)) }) - // TODO: test fails - it.skip('should handle SIGINT gracefully', function (done) { - this.timeout(20 * 1000) + it('should handle SIGINT gracefully', function (done) { + this.timeout(100 * 1000) testSignal(ipfs, 'SIGINT').then(() => { checkLock(repoPath, done) }).catch(done) }) - // TODO: test fails - it.skip('should handle SIGTERM gracefully', function (done) { - this.timeout(20 * 1000) + it('should handle SIGTERM gracefully', function (done) { + this.timeout(100 * 1000) testSignal(ipfs, 'SIGTERM').then(() => { checkLock(repoPath, done)