0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Revert "Fixed theme storage getting confused between tests"

This reverts commit 3e7039c47d.
This commit is contained in:
Hannah Wolfe 2022-02-11 11:08:28 +00:00
parent 46db240bf9
commit 9375a1701a
No known key found for this signature in database
GPG key ID: AB586C3B5AE5C037
3 changed files with 3 additions and 11 deletions

View file

@ -148,8 +148,5 @@ module.exports = {
let result = await getStorage().delete(themeName);
list.del(themeName);
return result;
},
updateStoragePath: function (storagePath) {
getStorage().storagePath = storagePath;
}
};

View file

@ -25,23 +25,20 @@ const redirectsUtils = require('./redirects');
const configUtils = require('./configUtils');
const mockManager = require('./e2e-framework-mock-manager');
const themeStorage = require('../../core/server/services/themes/storage');
const boot = require('../../core/boot');
const TestAgent = require('./test-agent');
const db = require('./db-utils');
const startGhost = async () => {
/**
* We never use the root content folder for testing!
* We use a tmp folder.
*/
* We never use the root content folder for testing!
* We use a tmp folder.
*/
const contentFolder = path.join(os.tmpdir(), uuid.v4(), 'ghost-test');
await prepareContentFolder({contentFolder});
// NOTE: need to pass this config to the server instance
configUtils.set('paths:contentPath', contentFolder);
themeStorage.updateStoragePath(configUtils.config.getContentPath('themes'));
const defaults = {
backend: true,

View file

@ -18,7 +18,6 @@ const urlService = require('../../core/server/services/url');
const settingsService = require('../../core/server/services/settings');
const routeSettingsService = require('../../core/server/services/route-settings');
const themeService = require('../../core/server/services/themes');
const themeStorage = require('../../core/server/services/themes/storage');
const limits = require('../../core/server/services/limits');
const customRedirectsService = require('../../core/server/services/redirects');
@ -70,7 +69,6 @@ const prepareContentFolder = (options) => {
* We use a tmp folder.
*/
configUtils.set('paths:contentPath', contentFolderForTests);
themeStorage.updateStoragePath(configUtils.config.getContentPath('themes'));
fs.ensureDirSync(contentFolderForTests);
fs.ensureDirSync(path.join(contentFolderForTests, 'data'));