From d2fdfa5712e4f6e63e8131c3fc2b33275ab20b6a Mon Sep 17 00:00:00 2001 From: Pedro Dias Date: Fri, 8 Sep 2017 12:39:13 +0100 Subject: [PATCH] Empty data, tests, version bump --- lib/container.js | 1 + lib/exec.js | 1 + package.json | 2 +- test/container.js | 8 ++++---- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/container.js b/lib/container.js index 61366a5..38b5633 100644 --- a/lib/container.js +++ b/lib/container.js @@ -306,6 +306,7 @@ Container.prototype.createCheckpoint = function(opts, callback) { var optsf = { path: '/containers/' + this.id + '/checkpoints', method: 'POST', + allowEmpty: true, statusCodes: { 200: true, //unofficial, but proxies may return it 204: true, diff --git a/lib/exec.js b/lib/exec.js index 761baec..5f77bc3 100644 --- a/lib/exec.js +++ b/lib/exec.js @@ -26,6 +26,7 @@ Exec.prototype.start = function(opts, callback) { path: '/exec/' + this.id + '/start', method: 'POST', isStream: true, + allowEmpty: true, hijack: args.opts.hijack, openStdin: args.opts.stdin, statusCodes: { diff --git a/package.json b/package.json index 5bfca66..a5967ed 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dockerode", "description": "Docker Remote API module.", - "version": "2.5.0", + "version": "2.5.1", "author": "Pedro Dias ", "maintainers": [ "apocas " diff --git a/test/container.js b/test/container.js index f023a19..9a678e2 100644 --- a/test/container.js +++ b/test/container.js @@ -21,6 +21,7 @@ describe("#container", function() { }, function(err, container) { if (err) done(err); testContainer = container.id; + console.log('Created test container ' + container.id); done(); }); }); @@ -572,7 +573,7 @@ describe("#container", function() { describe("#exec", function() { it("should run exec on a container", function(done) { - this.timeout(10000); + this.timeout(20000); var options = { Cmd: ["echo", "'foo'"] }; @@ -599,15 +600,14 @@ describe("#container", function() { }); it("should allow exec stream hijacking on a container", function(done) { - this.timeout(10000); + this.timeout(20000); var options = { Cmd: ["cat"], AttachStdin: true, AttachStdout: true, }; var startOpts = { - hijack: true, - stdin: true, + hijack: true }; var container = docker.getContainer(testContainer);