From 662bdd79657d8d610aaf436161a493fd8059140c Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Thu, 23 Jun 2016 11:27:14 -0700 Subject: [PATCH] joyent/node-manta#246 Update dependencies for a Node v6 age MANTA-2929: InvalidUpdateError on mchmod from clients after Node 0.12 - 'make testall' to somewhat easily test against all supported node versions - Convert to using restify-clients instead of restify. This drops having the "bin/m*" tools set "serializers" in they logger because that gets added via "log.child" in "createBinClient". - Add "license" field to package.json to avoid 'npm install' warning. - Added "node-manta-test-" prefix to the dir created in Manta when running the test suite. This helps for manual cleaning up after failed test runs. - Fix two places where 'make test' would hang while a Manta client had an open connection (the "agent:false" additions in client.test.js). - MANTA-2929: ensure no implicit content-length by forcing chunked transfer-encoding for PutMetadata requests. --- .gitignore | 1 + .npmignore | 2 +- Makefile | 50 +++++++++++++++++++++++++++++++++++++++++ bin/mchattr | 8 +++---- bin/mchmod | 8 +++---- bin/mfind | 8 +++---- bin/mget | 8 +++---- bin/minfo | 8 +++---- bin/mjob | 8 +++---- bin/mln | 8 +++---- bin/mlogin | 5 +++-- bin/mls | 6 ++--- bin/mmd5 | 8 +++---- bin/mmkdir | 8 +++---- bin/mput | 8 +++---- bin/mrm | 8 +++---- bin/mrmdir | 8 +++---- bin/msign | 8 +++---- bin/muntar | 8 +++---- lib/client.js | 13 +++++++---- lib/create_client.js | 8 ++++--- package.json | 5 +++-- test/client.test.js | 30 +++++++++++++------------ test/node.paths.example | 5 +++++ 24 files changed, 151 insertions(+), 86 deletions(-) create mode 100644 test/node.paths.example diff --git a/.gitignore b/.gitignore index fcb86af..bd1461c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ cscope.po.out cscope.out smf/manifests/bapi.xml *.tgz +/test/node.paths diff --git a/.npmignore b/.npmignore index 486127c..65711c7 100644 --- a/.npmignore +++ b/.npmignore @@ -3,4 +3,4 @@ Makefile deps docs test -tools \ No newline at end of file +tools diff --git a/Makefile b/Makefile index ce102cb..c2ea17b 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,56 @@ test: deps unset MANTA_DEFAULT_CONTENT_TYPE; \ $(NODEUNIT) test +# +# Test with a bunch of node versions. +# +# This requires a "test/node.paths" file that looks something like +# "test/node.paths.example". +# +.PHONY: testall +testall: test6 test5 test4 test012 test010 + +.PHONY: test6 +test6: + @([[ -f test/node.paths ]] || (echo "no test/node.paths" && exit 1) \ + && echo "# Test with node `$(shell awk '/^6/ { print $$2 }' test/node.paths)/node --version`" \ + && PATH="$(shell awk '/^6/ { print $$2 }' test/node.paths):$(PATH)" \ + NPM_CONFIG_LOGLEVEL=silent NPM_CONFIG_PROGRESS=false \ + make clean test) + +.PHONY: test5 +test5: + @([[ -f test/node.paths ]] || (echo "no test/node.paths" && exit 1) \ + && echo "# Test with node `$(shell awk '/^5/ { print $$2 }' test/node.paths)/node --version`" \ + && PATH="$(shell awk '/^5/ { print $$2 }' test/node.paths):$(PATH)" \ + NPM_CONFIG_LOGLEVEL=silent NPM_CONFIG_PROGRESS=false \ + make clean test) + +.PHONY: test4 +test4: + @([[ -f test/node.paths ]] || (echo "no test/node.paths" && exit 1) \ + && echo "# Test with node `$(shell awk '/^4/ { print $$2 }' test/node.paths)/node --version`" \ + && PATH="$(shell awk '/^4/ { print $$2 }' test/node.paths):$(PATH)" \ + NPM_CONFIG_LOGLEVEL=silent NPM_CONFIG_PROGRESS=false \ + make clean test) + +.PHONY: test012 +test012: + @([[ -f test/node.paths ]] || (echo "no test/node.paths" && exit 1) \ + && echo "# Test with node `$(shell awk '/^0\.12/ { print $$2 }' test/node.paths)/node --version`" \ + && PATH="$(shell awk '/^0\.12/ { print $$2 }' test/node.paths):$(PATH)" \ + NPM_CONFIG_LOGLEVEL=silent NPM_CONFIG_PROGRESS=false \ + make clean test) + +.PHONY: test010 +test010: + @([[ -f test/node.paths ]] || (echo "no test/node.paths" && exit 1) \ + && echo "# Test with node `$(shell awk '/^0\.10/ { print $$2 }' test/node.paths)/node --version`" \ + && PATH="$(shell awk '/^0\.10/ { print $$2 }' test/node.paths):$(PATH)" \ + NPM_CONFIG_LOGLEVEL=silent NPM_CONFIG_PROGRESS=false \ + make clean test) + + $(MAN_OUTDIR): mkdir -p $@ diff --git a/bin/mchattr b/bin/mchattr index 67cdfef..57a8e60 100755 --- a/bin/mchattr +++ b/bin/mchattr @@ -1,13 +1,14 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2014, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var path = require('path'); var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -18,8 +19,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mchmod b/bin/mchmod index d472a8a..aadd417 100755 --- a/bin/mchmod +++ b/bin/mchmod @@ -1,13 +1,14 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2014, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var path = require('path'); var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -19,8 +20,7 @@ var name = path.basename(process.argv[1]); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mfind b/bin/mfind index c91e05f..8a6bfad 100755 --- a/bin/mfind +++ b/bin/mfind @@ -1,6 +1,8 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var http = require('http'); var https = require('https'); @@ -10,7 +12,6 @@ var url = require('url'); var assert = require('assert-plus'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var vasync = require('vasync'); var manta = require('../lib'); @@ -23,8 +24,7 @@ var CLIENT; var LOG = bunyan.createLogger({ name: require('path').basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mget b/bin/mget index 2393416..2015526 100755 --- a/bin/mget +++ b/bin/mget @@ -1,6 +1,8 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var fs = require('fs'); var http = require('http'); @@ -9,7 +11,6 @@ var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -20,8 +21,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/minfo b/bin/minfo index cd41f9a..3876c37 100755 --- a/bin/minfo +++ b/bin/minfo @@ -1,13 +1,14 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var http = require('http'); var path = require('path-platform'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -18,8 +19,7 @@ var name = path.basename(process.argv[1]); var LOG = bunyan.createLogger({ name: name, level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mjob b/bin/mjob index 0693bfd..330a558 100755 --- a/bin/mjob +++ b/bin/mjob @@ -1,6 +1,8 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var EventEmitter = require('events').EventEmitter; var fs = require('fs'); @@ -15,7 +17,6 @@ var cmdln = require('cmdln'); var LineStream = require('lstream'); var moment = require('moment'); var once = require('once'); -var restify = require('restify'); var manta = require('../lib'); @@ -30,8 +31,7 @@ var JOB_DATA_FMT = '/%s/jobs/%s/%s.txt'; var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); diff --git a/bin/mln b/bin/mln index aa558c1..1dc3164 100755 --- a/bin/mln +++ b/bin/mln @@ -1,6 +1,8 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var fs = require('fs'); var path = require('path-platform'); @@ -8,7 +10,6 @@ var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -19,8 +20,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mlogin b/bin/mlogin index 22b0bfe..678ebee 100755 --- a/bin/mlogin +++ b/bin/mlogin @@ -1,8 +1,9 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013 Joyent, Inc. All rights reserved. // vim: set syntax=javascript ts=4 sts=4 sw=4 et: - +/* + * Copyright 2016 Joyent, Inc. + */ var net = require('net'); var url = require('url'); diff --git a/bin/mls b/bin/mls index c1a825a..50f917c 100755 --- a/bin/mls +++ b/bin/mls @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. */ var path = require('path-platform'); @@ -10,7 +10,6 @@ var bunyan = require('bunyan'); var dashdash = require('dashdash'); var moment = require('moment'); var once = require('once'); -var restify = require('restify'); var sprintf = require('extsprintf').sprintf; var manta = require('../lib'); @@ -22,8 +21,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mmd5 b/bin/mmd5 index 1f1d521..165559a 100755 --- a/bin/mmd5 +++ b/bin/mmd5 @@ -1,6 +1,8 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var fs = require('fs'); var path = require('path'); @@ -8,7 +10,6 @@ var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var vasync = require('vasync'); var manta = require('../lib'); @@ -22,8 +23,7 @@ var HAD_ERR = false; var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ options: manta.DEFAULT_CLI_OPTIONS diff --git a/bin/mmkdir b/bin/mmkdir index 9ee2024..10dd55a 100755 --- a/bin/mmkdir +++ b/bin/mmkdir @@ -1,13 +1,14 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var path = require('path'); var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -18,8 +19,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mput b/bin/mput index 25cf8e3..991344b 100755 --- a/bin/mput +++ b/bin/mput @@ -1,6 +1,8 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var crypto = require('crypto'); var fs = require('fs'); @@ -11,7 +13,6 @@ var backoff = require('backoff'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); var once = require('once'); -var restify = require('restify'); var manta = require('../lib'); @@ -22,8 +23,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mrm b/bin/mrm index 4e3b65e..9925fa1 100755 --- a/bin/mrm +++ b/bin/mrm @@ -1,13 +1,14 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var path = require('path'); var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -18,8 +19,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ diff --git a/bin/mrmdir b/bin/mrmdir index de5c8be..f3e7768 100755 --- a/bin/mrmdir +++ b/bin/mrmdir @@ -1,13 +1,14 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var path = require('path'); var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -18,8 +19,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var OPTIONS_PARSER = dashdash.createParser({ options: manta.DEFAULT_CLI_OPTIONS diff --git a/bin/msign b/bin/msign index 8741e06..e44805e 100755 --- a/bin/msign +++ b/bin/msign @@ -1,6 +1,8 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var fs = require('fs'); var path = require('path'); @@ -8,7 +10,6 @@ var url = require('url'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); -var restify = require('restify'); var manta = require('../lib'); @@ -19,8 +20,7 @@ var manta = require('../lib'); var LOG = bunyan.createLogger({ name: path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var METHODS = ['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'OPTIONS']; diff --git a/bin/muntar b/bin/muntar index 7c30aee..41d6060 100755 --- a/bin/muntar +++ b/bin/muntar @@ -1,6 +1,8 @@ #!/usr/bin/env node // -*- mode: js -*- -// Copyright (c) 2013, Joyent, Inc. All rights reserved. +/* + * Copyright 2016 Joyent, Inc. + */ var fs = require('fs'); var url = require('url'); @@ -10,7 +12,6 @@ var mod_path = require('path'); var bunyan = require('bunyan'); var dashdash = require('dashdash'); var once = require('once'); -var restify = require('restify'); var manta = require('../lib'); @@ -24,8 +25,7 @@ var IN_PROGRESS = {}; var LOG = bunyan.createLogger({ name: mod_path.basename(process.argv[1]), level: (process.env.LOG_LEVEL || 'info'), - stream: process.stderr, - serializers: restify.bunyan.serializers + stream: process.stderr }); var MAX_SOCKETS = parseInt(process.env.MANTA_MAX_SOCKETS || 1000, 10); diff --git a/lib/client.js b/lib/client.js index 8bfeb26..f449c75 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1,5 +1,5 @@ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. */ var EventEmitter = require('events').EventEmitter; @@ -17,7 +17,7 @@ if (!PassThrough) PassThrough = require('readable-stream/passthrough.js'); var mime = require('mime'); var once = require('once'); -var restify = require('restify'); +var restifyClients = require('restify-clients'); var vasync = require('vasync'); var Watershed = require('watershed').Watershed; var LOMStream = require('lomstream').LOMStream; @@ -255,7 +255,7 @@ function createOptions(opts, userOpts) { function createRestifyClient(opts, type) { - var client = restify.createClient({ + var client = restifyClients.createClient({ agent: opts.agent, ca: opts.ca, ciphers: opts.ciphers, @@ -701,9 +701,14 @@ MantaClient.prototype.chattr = function chattr(p, opts, cb) { options.path += '?metadata=true'; - log.level('trace'); // XXX + // XXX cheat: + // 0 didn't work, ... + // null gives socket hangup: is this crashing muskie? follow up + //options.headers['content-length'] = undefined; + options.headers['transfer-encoding'] = 'chunked'; log.debug(options, 'chattr: entered'); + self.signRequest({ headers: options.headers }, function onSignRequest(err) { diff --git a/lib/create_client.js b/lib/create_client.js index bfa163e..8024300 100644 --- a/lib/create_client.js +++ b/lib/create_client.js @@ -5,8 +5,10 @@ var path = require('path'); var assert = require('assert-plus'); var bunyan = require('bunyan'); -var restify = require('restify'); var dashdash = require('dashdash'); +// We are cheating here. restify-clients should export its 'bunyan'. +var restifyBunyanSerializers = + require('restify-clients/lib/helpers/bunyan').serializers; var auth = require('smartdc-auth'); var manta = require('./client'); @@ -100,12 +102,12 @@ function createClient(options) { name: 'MantaClient', stream: process.stderr, level: process.env.MANTA_LOG_LEVEL || 'fatal', - serializers: restify.bunyan.serializers + serializers: restifyBunyanSerializers }); } else { opts.log = options.log.child({ component: 'MantaClient', - serializers: restify.bunyan.serializers + serializers: restifyBunyanSerializers }); } diff --git a/package.json b/package.json index cf28742..fcb6379 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "path-platform": "0.0.1", "progbar": "1.0.0", "readable-stream": "1.1.9", - "restify": "4.0.4", + "restify-clients": "1.2.1", "showdown": "1.3.0", "smartdc-auth": "2.4.1", "tar": "2.2.1", @@ -52,5 +52,6 @@ }, "scripts": { "test": "./node_modules/.bin/nodeunit test/*.test.js" - } + }, + "license": "MPL-2.0" } diff --git a/test/client.test.js b/test/client.test.js index ef14a52..e8d8220 100644 --- a/test/client.test.js +++ b/test/client.test.js @@ -1,5 +1,5 @@ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. */ var exec = require('child_process').exec; @@ -9,7 +9,6 @@ var path = require('path'); var libuuid = require('node-uuid'); var MemoryStream = require('readable-stream/passthrough.js'); var bunyan = require('bunyan'); -var restify = require('restify'); var manta = require('../lib'); @@ -21,7 +20,7 @@ var manta = require('../lib'); var JOB; var ROOT = '/' + (process.env.MANTA_USER || 'admin') + '/stor'; var PUBLIC = '/' + (process.env.MANTA_USER || 'admin') + '/public'; -var SUBDIR1 = ROOT + '/' + libuuid.v4(); +var SUBDIR1 = ROOT + '/node-manta-test-' + libuuid.v4().split('-')[0]; var SUBDIR2 = SUBDIR1 + '/' + libuuid.v4(); // directory var CHILD1 = SUBDIR1 + '/' + libuuid.v4(); // object var CHILD2 = SUBDIR2 + '/' + libuuid.v4(); // link @@ -46,8 +45,7 @@ function createLogger(name, stream) { level: (process.env.LOG_LEVEL || 'info'), name: name || process.argv[1], stream: stream || process.stdout, - src: true, - serializers: restify.bunyan.serializers + src: true })); } @@ -231,17 +229,19 @@ test('chattr', function (t) { } self.client.chattr(CHILD1, opts, function onChattr(err1) { - console.log('XXX err1', err1); - t.ifError(err1); + t.ok(!err1, 'err1: ' + err1); self.client.info(CHILD1, function onInfo(err2, info2) { - t.ifError(err2); - t.ok(info2); + t.ok(!err2, 'err2: ' + err2); + t.ok(info2, 'got info2: ' + info2); if (info2) { - t.ok(info2.headers); + t.ok(info2.headers, 'got info2.headers: ' + info2.headers); var headers = info2.headers || {}; - t.equal(headers['m-foo'], 'bar'); - t.equal(info2.etag, info.etag); + t.equal(headers['m-foo'], 'bar', + 'info2.headers["m-foo"] is "bar": ' + headers['m-foo']); + t.equal(info2.etag, info.etag, + 'info2.etag is unchanged: before=' + info.etag + + ' after=' + info2.etag); } t.done(); }); @@ -764,7 +764,8 @@ test('MANTA-2812 null signer', function (t) { var c = manta.createClient({ sign: function (data, cb) { cb(null, null); }, url: process.env.MANTA_URL, - user: process.env.MANTA_USER + user: process.env.MANTA_USER, + agent: false }); c.ls(ROOT, function (err) { t.ok(err); @@ -781,7 +782,8 @@ test('MANTA-2812 undefined signer', function (t) { var c = manta.createClient({ sign: undefined, url: process.env.MANTA_URL, - user: process.env.MANTA_USER + user: process.env.MANTA_USER, + agent: false }); c.ls(ROOT, function (err) { t.ok(err); diff --git a/test/node.paths.example b/test/node.paths.example new file mode 100644 index 0000000..f5d0cec --- /dev/null +++ b/test/node.paths.example @@ -0,0 +1,5 @@ +6 /Users/trentm/opt/node-6/bin +5 /Users/trentm/opt/node-5/bin +4 /Users/trentm/opt/node-4/bin +0.12 /Users/trentm/opt/node-0.12/bin +0.10 /Users/trentm/opt/node-0.10/bin