mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05: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
2 changed files with 7 additions and 7 deletions
|
@ -8,8 +8,8 @@ describe('Config API', function () {
|
||||||
let request;
|
let request;
|
||||||
|
|
||||||
before(async function () {
|
before(async function () {
|
||||||
await localUtils.startGhost();
|
const app = await localUtils.startGhost();
|
||||||
request = supertest.agent(config.get('url'));
|
request = supertest.agent(app);
|
||||||
await localUtils.doAuth(request);
|
await localUtils.doAuth(request);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -137,10 +137,6 @@ const restartModeGhostStart = async ({frontend}) => {
|
||||||
limits.init();
|
limits.init();
|
||||||
};
|
};
|
||||||
|
|
||||||
const bootGhost = async ({backend, frontend}) => {
|
|
||||||
ghostServer = await boot({backend, frontend});
|
|
||||||
};
|
|
||||||
|
|
||||||
// CASE: Ghost Server needs Starting
|
// CASE: Ghost Server needs Starting
|
||||||
// In this case we need to ensure that Ghost is started cleanly:
|
// In this case we need to ensure that Ghost is started cleanly:
|
||||||
// - ensure the DB is reset
|
// - ensure the DB is reset
|
||||||
|
@ -166,7 +162,11 @@ const freshModeGhostStart = async (options) => {
|
||||||
await settingsService.init();
|
await settingsService.init();
|
||||||
|
|
||||||
// Actually boot Ghost
|
// 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
|
// Wait for the URL service to be ready, which happens after boot
|
||||||
if (options.frontend) {
|
if (options.frontend) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue