From f69aba72d1eec449ce1691317f95cb8737e43b37 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 26 May 2017 12:57:03 +0200 Subject: [PATCH] fix: tls tests work again --- test/lib/stunnel-process.js | 2 +- test/tls.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/lib/stunnel-process.js b/test/lib/stunnel-process.js index b277ef4529..e3cc321545 100644 --- a/test/lib/stunnel-process.js +++ b/test/lib/stunnel-process.js @@ -21,7 +21,7 @@ function StunnelProcess (confDir) { // Set up an stunnel to redis; edit the conf file to include required absolute paths const confFile = path.resolve(confDir, 'stunnel.conf') - const confText = fs.readFileSync(`${confFile}.template`).toString().replace(/__dirname,/g, confDir) + const confText = fs.readFileSync(`${confFile}.template`).toString().replace(/__dirname/g, confDir) fs.writeFileSync(confFile, confText) const stunnel = this.stunnel = spawn('stunnel', [confFile]) diff --git a/test/tls.spec.js b/test/tls.spec.js index 04c1706b6b..1ca30c333f 100644 --- a/test/tls.spec.js +++ b/test/tls.spec.js @@ -21,7 +21,7 @@ let skip = false // Wait until stunnel4 is in the travis whitelist // Check: https://github.com/travis-ci/apt-package-whitelist/issues/403 // If this is merged, remove the travis env checks -describe.skip('TLS connection tests', () => { +describe('TLS connection tests', () => { before((done) => { // Print the warning when the tests run instead of while starting mocha if (process.platform === 'win32') { @@ -121,7 +121,7 @@ describe.skip('TLS connection tests', () => { assert(/DEPTH_ZERO_SELF_SIGNED_CERT/.test(err.code || err.message), err) client.end(true) }) - return client.set('foo', 'bar').then(helper.isError()) + return client.set('foo', 'bar').catch(helper.isError()) }) }) })