feat(portal-data): scaling is now supported
This commit is contained in:
parent
123eafbb5c
commit
86b52a96f5
@ -393,16 +393,15 @@ module.exports = class Data extends EventEmitter {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
provisionName: deployment_group.name,
|
projectName: deployment_group.name,
|
||||||
services: {},
|
services: {},
|
||||||
manifest: manifest.raw
|
manifest: manifest.raw
|
||||||
};
|
};
|
||||||
options.services[service.name] = replicas;
|
options.services[service.name] = replicas;
|
||||||
this._docker.scale(options, (err, res) => {
|
this._docker.scale(options, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return cb(err);
|
return cb(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
hello:
|
traefik:
|
||||||
image: hello-world:latest
|
image: traefik:latest
|
||||||
|
@ -696,9 +696,10 @@ describe.skip('scale()', () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
data.getDeploymentGroup({ id: deploymentGroup.id }, (err, deploymentGroup) => {
|
data.getDeploymentGroup({ id: deploymentGroup.id }, (err, deploymentGroup) => {
|
||||||
expect(err).to.not.exist();
|
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(err).to.not.exist();
|
||||||
expect(version).to.exist();
|
expect(version).to.exist();
|
||||||
|
expect(version.scales[0].replicas).to.equal(3);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user