diff --git a/lib/docker.js b/lib/docker.js index 9c577a0..c37753a 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -51,6 +51,7 @@ Docker.prototype.createContainer = function(opts, callback) { statusCodes: { 200: true, // unofficial, but proxies may return it 201: true, + 400: 'bad parameter', 404: 'no such container', 406: 'impossible to attach', 500: 'server error' diff --git a/package-lock.json b/package-lock.json index 93b5d6e..67ae99e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "dockerode", - "version": "3.3.5", + "version": "4.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dockerode", - "version": "3.3.5", + "version": "4.0.0", "license": "Apache-2.0", "dependencies": { "@balena/dockerignore": "^1.0.2", - "docker-modem": "^3.0.0", + "docker-modem": "^5.0.0", "tar-fs": "~2.0.1" }, "devDependencies": { @@ -411,9 +411,9 @@ } }, "node_modules/docker-modem": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-3.0.8.tgz", - "integrity": "sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.0.tgz", + "integrity": "sha512-J1gOocUHrYOI0u5+SbM9eg84igD40NfUJoWL9Hc2a6hF3oN6PFA9fmzu2Ai8fddXrVUJbENx5STOlcvhTau4rA==", "dependencies": { "debug": "^4.1.1", "readable-stream": "^3.5.0", @@ -531,9 +531,9 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "engines": { "node": "*" @@ -1535,9 +1535,9 @@ "dev": true }, "docker-modem": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-3.0.8.tgz", - "integrity": "sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.0.tgz", + "integrity": "sha512-J1gOocUHrYOI0u5+SbM9eg84igD40NfUJoWL9Hc2a6hF3oN6PFA9fmzu2Ai8fddXrVUJbENx5STOlcvhTau4rA==", "requires": { "debug": "^4.1.1", "readable-stream": "^3.5.0", @@ -1621,9 +1621,9 @@ "dev": true }, "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true }, "glob": { diff --git a/package.json b/package.json index 897916d..7f2c0ff 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dockerode", "description": "Docker Remote API module.", - "version": "3.3.5", + "version": "4.0.0", "author": "Pedro Dias ", "maintainers": [ "apocas " @@ -16,7 +16,7 @@ ], "dependencies": { "@balena/dockerignore": "^1.0.2", - "docker-modem": "^3.0.0", + "docker-modem": "^5.0.0", "tar-fs": "~2.0.1" }, "devDependencies": { diff --git a/test/container.js b/test/container.js index 948c604..6100606 100644 --- a/test/container.js +++ b/test/container.js @@ -71,9 +71,8 @@ describe("#container", function() { it("should put an archive inside the container", function(done) { var container = docker.getContainer(testContainer); - function handler(err, data) { + function handler(err) { expect(err).to.be.null; - expect(data).to.be.ok; done(); } diff --git a/test/docker.js b/test/docker.js index 55481c1..aad8974 100644 --- a/test/docker.js +++ b/test/docker.js @@ -433,7 +433,6 @@ describe("#docker", function() { expect(container).to.be.ok; container.remove(function(err, data) { - console.log(data) expect(err).to.be.null; done(); }); diff --git a/test/plugin.js b/test/plugin.js index 2cb23d4..7998d51 100644 --- a/test/plugin.js +++ b/test/plugin.js @@ -115,9 +115,8 @@ describe("#plugin", function() { this.timeout(15000); var plugin = docker.getPlugin('sshfs'); - function handler(err, data) { + function handler(err) { expect(err).to.be.null; - expect(data).to.be.ok; done(); } diff --git a/test/swarm.js b/test/swarm.js index c0a227f..01b7213 100644 --- a/test/swarm.js +++ b/test/swarm.js @@ -99,9 +99,8 @@ describe("#swarm", function() { it("should update secret", function(done) { this.timeout(15000); - function handler(err, data) { + function handler(err) { expect(err).to.be.null; - expect(data).to.be.ok; done(); } var opts = { @@ -180,9 +179,8 @@ describe("#swarm", function() { it("should update config", function(done) { this.timeout(15000); - function handler(err, data) { + function handler(err) { expect(err).to.be.null; - expect(data).to.be.ok; done(); } var opts = {