From 86b52a96f5ab03f24fb08a9b6f0c3243342d1da1 Mon Sep 17 00:00:00 2001 From: geek Date: Mon, 5 Jun 2017 11:33:13 -0500 Subject: [PATCH] feat(portal-data): scaling is now supported --- packages/portal-data/lib/index.js | 5 ++--- packages/portal-data/test/docker-compose.yml | 4 ++-- packages/portal-data/test/index.js | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/portal-data/lib/index.js b/packages/portal-data/lib/index.js index dd699448..8f48b956 100644 --- a/packages/portal-data/lib/index.js +++ b/packages/portal-data/lib/index.js @@ -393,16 +393,15 @@ module.exports = class Data extends EventEmitter { }; const options = { - provisionName: deployment_group.name, + projectName: deployment_group.name, services: {}, manifest: manifest.raw }; options.services[service.name] = replicas; - this._docker.scale(options, (err, res) => { + this._docker.scale(options, (err) => { if (err) { return cb(err); } - finish(); }); } diff --git a/packages/portal-data/test/docker-compose.yml b/packages/portal-data/test/docker-compose.yml index 8bd2faf7..519387b5 100644 --- a/packages/portal-data/test/docker-compose.yml +++ b/packages/portal-data/test/docker-compose.yml @@ -1,2 +1,2 @@ -hello: - image: hello-world:latest +traefik: + image: traefik:latest diff --git a/packages/portal-data/test/index.js b/packages/portal-data/test/index.js index 5e40f521..20976c1e 100644 --- a/packages/portal-data/test/index.js +++ b/packages/portal-data/test/index.js @@ -696,9 +696,10 @@ describe.skip('scale()', () => { setTimeout(() => { data.getDeploymentGroup({ id: deploymentGroup.id }, (err, deploymentGroup) => { expect(err).to.not.exist(); - data.scale({ id: deploymentGroup.services[0].id, replicas: 2 }, (err, version) => { + data.scale({ id: deploymentGroup.services[0].id, replicas: 3 }, (err, version) => { expect(err).to.not.exist(); expect(version).to.exist(); + expect(version.scales[0].replicas).to.equal(3); done(); }); });