Do not send alive status
we used to do this for managed hosting to track scaling but we don't need this info anymore
This commit is contained in:
@@ -50,57 +50,10 @@ describe('Appstore', function () {
|
||||
|
||||
beforeEach(nock.cleanAll);
|
||||
|
||||
it('cannot send alive status without registering', function (done) {
|
||||
appstore.sendAliveStatus(function (error) {
|
||||
expect(error).to.be.ok();
|
||||
expect(error.reason).to.equal(BoxError.LICENSE_ERROR); // missing token
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('can set cloudron token', function (done) {
|
||||
settingsdb.set(settings.CLOUDRON_TOKEN_KEY, APPSTORE_TOKEN, done);
|
||||
});
|
||||
|
||||
it('can send alive status', function (done) {
|
||||
var scope = nock(MOCK_API_SERVER_ORIGIN)
|
||||
.post(`/api/v1/alive?accessToken=${APPSTORE_TOKEN}`, function (body) {
|
||||
expect(body.version).to.be.a('string');
|
||||
expect(body.adminFqdn).to.be.a('string');
|
||||
expect(body.backendSettings).to.be.an('object');
|
||||
expect(body.backendSettings.backupConfig).to.be.an('object');
|
||||
expect(body.backendSettings.backupConfig.provider).to.be.a('string');
|
||||
expect(body.backendSettings.backupConfig.hardlinks).to.be.a('boolean');
|
||||
expect(body.backendSettings.domainConfig).to.be.an('object');
|
||||
expect(body.backendSettings.domainConfig.count).to.be.a('number');
|
||||
expect(body.backendSettings.domainConfig.domains).to.be.an('array');
|
||||
expect(body.backendSettings.mailConfig).to.be.an('object');
|
||||
expect(body.backendSettings.mailConfig.outboundCount).to.be.a('number');
|
||||
expect(body.backendSettings.mailConfig.inboundCount).to.be.a('number');
|
||||
expect(body.backendSettings.mailConfig.catchAllCount).to.be.a('number');
|
||||
expect(body.backendSettings.mailConfig.relayProviders).to.be.an('array');
|
||||
expect(body.backendSettings.appAutoupdatePattern).to.be.a('string');
|
||||
expect(body.backendSettings.boxAutoupdatePattern).to.be.a('string');
|
||||
expect(body.backendSettings.sysinfoProvider).to.be.a('string');
|
||||
expect(body.backendSettings.timeZone).to.be.a('string');
|
||||
expect(body.machine).to.be.an('object');
|
||||
expect(body.machine.cpus).to.be.an('array');
|
||||
expect(body.machine.totalmem).to.be.an('number');
|
||||
expect(body.events).to.be.an('object');
|
||||
expect(body.events.lastLogin).to.be.an('number');
|
||||
|
||||
return true;
|
||||
})
|
||||
.reply(201, { cloudron: { id: CLOUDRON_ID }});
|
||||
|
||||
appstore.sendAliveStatus(function (error) {
|
||||
expect(error).to.not.be.ok();
|
||||
expect(scope.isDone()).to.be.ok();
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('can purchase an app', function (done) {
|
||||
var scope1 = nock(MOCK_API_SERVER_ORIGIN)
|
||||
.post(`/api/v1/cloudronapps?accessToken=${APPSTORE_TOKEN}`, function () { return true; })
|
||||
|
||||
Reference in New Issue
Block a user