apps: configure cpuShares

This commit is contained in:
Girish Ramakrishnan
2020-01-28 21:30:35 -08:00
parent d1d3309e91
commit 4ba9f80d44
10 changed files with 89 additions and 7 deletions
+4
View File
@@ -113,6 +113,7 @@ describe('Apps', function () {
portBindings: { PORT: 5678 },
accessRestriction: null,
memoryLimit: 0,
cpuShares: 512,
reverseProxyConfig: null,
sso: false,
mailboxDomain: DOMAIN_0.domain,
@@ -137,6 +138,7 @@ describe('Apps', function () {
portBindings: {},
accessRestriction: { users: [ 'someuser' ], groups: [ GROUP_0.id ] },
memoryLimit: 0,
cpuShares: 512,
env: {},
dataDir: '',
mailboxDomain: DOMAIN_0.domain,
@@ -157,6 +159,7 @@ describe('Apps', function () {
portBindings: {},
accessRestriction: { users: [ 'someuser', USER_0.id ], groups: [ GROUP_1.id ] },
memoryLimit: 0,
cpuShares: 512,
reverseProxyConfig: null,
sso: false,
env: {},
@@ -232,6 +235,7 @@ describe('Apps', function () {
expect(app.iconUrl).to.be(null);
expect(app.fqdn).to.eql(APP_0.location + '.' + DOMAIN_0.domain);
expect(app.memoryLimit).to.eql(0);
expect(app.cpuShares).to.eql(512);
done();
});
});
+6 -1
View File
@@ -405,6 +405,7 @@ describe('database', function () {
accessRestriction: null,
lastBackupId: null,
memoryLimit: 4294967296,
cpuShares: 1024,
sso: true,
debugMode: null,
reverseProxyConfig: {},
@@ -983,6 +984,7 @@ describe('database', function () {
health: null,
accessRestriction: null,
memoryLimit: 4294967296,
cpuShares: 256,
sso: true,
debugMode: null,
reverseProxyConfig: {},
@@ -1015,6 +1017,7 @@ describe('database', function () {
health: null,
accessRestriction: { users: [ 'foobar' ] },
memoryLimit: 0,
cpuShares: 512,
sso: true,
debugMode: null,
reverseProxyConfig: {},
@@ -1111,6 +1114,7 @@ describe('database', function () {
APP_0.accessRestriction = '';
APP_0.httpPort = 1337;
APP_0.memoryLimit = 1337;
APP_0.cpuShares = 1024;
var data = {
installationState: APP_0.installationState,
@@ -1119,7 +1123,8 @@ describe('database', function () {
manifest: APP_0.manifest,
accessRestriction: APP_0.accessRestriction,
httpPort: APP_0.httpPort,
memoryLimit: APP_0.memoryLimit
memoryLimit: APP_0.memoryLimit,
cpuShares: APP_0.cpuShares
};
appdb.update(APP_0.id, data, function (error) {