mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
Reworked site regression test suite to serverless boot
refs https://github.com/TryGhost/Toolbox/issues/152 - Being able to set up test suites without blocking a port opens a door to new ways to run tests - for example this has been one of the blockers for running mocha tests in parallel - Additional benefit is lighter statrup, which reducec the test execution time slightly. Doesn't seem like much but these things stack up!
This commit is contained in:
parent
fc8ecc352f
commit
4a1bee0a01
@ -8,8 +8,8 @@ describe('Config API', function () {
|
||||
let request;
|
||||
|
||||
before(async function () {
|
||||
await localUtils.startGhost();
|
||||
request = supertest.agent(config.get('url'));
|
||||
const app = await localUtils.startGhost();
|
||||
request = supertest.agent(app);
|
||||
await localUtils.doAuth(request);
|
||||
});
|
||||
|
||||
|
@ -137,10 +137,6 @@ const restartModeGhostStart = async ({frontend}) => {
|
||||
limits.init();
|
||||
};
|
||||
|
||||
const bootGhost = async ({backend, frontend}) => {
|
||||
ghostServer = await boot({backend, frontend});
|
||||
};
|
||||
|
||||
// CASE: Ghost Server needs Starting
|
||||
// In this case we need to ensure that Ghost is started cleanly:
|
||||
// - ensure the DB is reset
|
||||
@ -166,7 +162,11 @@ const freshModeGhostStart = async (options) => {
|
||||
await settingsService.init();
|
||||
|
||||
// Actually boot Ghost
|
||||
await bootGhost(options);
|
||||
ghostServer = await boot({
|
||||
backend: options.backend,
|
||||
frontend: options.frontend,
|
||||
server: options.server
|
||||
});
|
||||
|
||||
// Wait for the URL service to be ready, which happens after boot
|
||||
if (options.frontend) {
|
||||
|
Loading…
Reference in New Issue
Block a user