mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-02-10 18:05:07 +08:00
[test] Add db table absence test; Remove useless isServerStartedUp
This commit is contained in:
@ -155,7 +155,6 @@ const EditorTypes = {
|
||||
const defaultHttpPort = 80, defaultHttpsPort = 443; // Default ports (for http and https)
|
||||
const editorData = new editorDataStorage();
|
||||
const clientStatsD = statsDClient.getClient();
|
||||
let isServerStartedUp = false;
|
||||
let connections = []; // Active connections
|
||||
let lockDocumentsTimerId = {};//to drop connection that can't unlockDocument
|
||||
let pubsub;
|
||||
@ -3971,7 +3970,6 @@ exports.install = function(server, callbackFunction) {
|
||||
editorData.connect().then(
|
||||
() => {
|
||||
callbackFunction();
|
||||
isServerStartedUp = true;
|
||||
},
|
||||
error => operationContext.global.logger.error('editorData error: %s', error.stack)
|
||||
);
|
||||
@ -4030,7 +4028,7 @@ exports.healthCheck = function(req, res) {
|
||||
}
|
||||
ctx.logger.debug('healthCheck storage');
|
||||
|
||||
output = isServerStartedUp;
|
||||
output = true;
|
||||
ctx.logger.info('healthCheck end');
|
||||
} catch (err) {
|
||||
ctx.logger.error('healthCheck error %s', err.stack);
|
||||
|
||||
@ -230,6 +230,11 @@ describe('Base database connector', function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
const table = "unused_table";
|
||||
test(`${table} table absence`, async function () {
|
||||
const result = await baseConnector.getTableColumns(ctx, table);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Changes manipulations', function () {
|
||||
|
||||
Reference in New Issue
Block a user