From 2ce7468ac2649eb682f0dc1dc86005c53142d028 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Sun, 25 Aug 2019 12:25:51 -0500 Subject: [PATCH] update uuid and tests to work with windows --- package.json | 4 ++-- test/client.test.js | 4 ++-- test/laundry.test.js | 4 ++-- test/server.test.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 272fde9..c06cad1 100644 --- a/package.json +++ b/package.json @@ -40,10 +40,10 @@ "verror": "^1.8.1" }, "devDependencies": { - "node-uuid": "^1.4.7", "faucet": "0.0.1", "istanbul": "^0.4.5", - "tape": "^4.6.2" + "tape": "^4.6.2", + "uuid": "^3.3.3" }, "scripts": { "report": "./node_modules/.bin/istanbul report html && open ./coverage/lcov-report/index.html", diff --git a/test/client.test.js b/test/client.test.js index a4b39d8..aa56398 100644 --- a/test/client.test.js +++ b/test/client.test.js @@ -3,7 +3,7 @@ var logger = Object.create(require('abstract-logging')); var test = require('tape').test; -var uuid = require('node-uuid'); +var uuid = require('uuid'); var vasync = require('vasync'); var util = require('util'); @@ -12,7 +12,7 @@ var util = require('util'); var BIND_DN = 'cn=root'; var BIND_PW = 'secret'; -var SOCKET = '/tmp/.' + uuid(); +var SOCKET = process.platform === 'win32' ? '\\\\.\\pipe\\' + uuid() : '/tmp/.' + uuid(); var SUFFIX = 'dc=test'; diff --git a/test/laundry.test.js b/test/laundry.test.js index d39abfc..2c4ece5 100644 --- a/test/laundry.test.js +++ b/test/laundry.test.js @@ -1,14 +1,14 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. var test = require('tape').test; -var uuid = require('node-uuid'); +var uuid = require('uuid'); var ldap = require('../lib/index'); ///--- Globals -var SOCKET = '/tmp/.' + uuid(); +var SOCKET = process.platform === 'win32' ? '\\\\.\\pipe\\' + uuid() : '/tmp/.' + uuid(); var SUFFIX = 'dc=' + uuid(); var client; diff --git a/test/server.test.js b/test/server.test.js index 1ac9227..46e5ca8 100644 --- a/test/server.test.js +++ b/test/server.test.js @@ -3,7 +3,7 @@ var logger = Object.create(require('abstract-logging')); var test = require('tape').test; -var uuid = require('node-uuid'); +var uuid = require('uuid'); var vasync = require('vasync');