Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
annemarie35 committed Sep 1, 2023
1 parent 0e83b27 commit 280d355
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
14 changes: 14 additions & 0 deletions build/services/auto-scaler-service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function createAutoscaller() {
return async () => {
return true
};
}

async function scalingoClient({ scalingoToken, scalingoApiUrl }) {
const client = await scalingo.clientFromToken(scalingoToken, { apiUrl: scalingoApiUrl });
}

module.exports = {
createAutoscaller,
scalingoClient
};
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const server = require('./server');
const { createCronJob } = require('./common/services/cron-job');
const githubServices = require('./common/services/github');
const { deploy } = require('./run/services/deploy');
const ecoModeService = require('./build/services/eco-mode-service');
const = require('./build/services/eco-mode-service');
const logger = require('./common/services/logger');

const init = async () => {
Expand Down
13 changes: 13 additions & 0 deletions test/unit/build/services/auto-scaler_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { expect, sinon } = require('../../../test-helper');
const { createAutoscaller } = require('../../../../build/services/auto-scaler-service.js');
describe('Unit | Services | AutoScaler ', function () {
describe('#startAutoScaler', function () {
it.only('should start the job', async function () {
// given
// when
const ret = createAutoscaller({});
// then
expect(await ret()).to.be.true;
});
});
});

0 comments on commit 280d355

Please sign in to comment.