Moved cacheRules from testUtils into fixtures

- yet more tidy up of the huge test utils index file
This commit is contained in:
Hannah Wolfe 2021-02-17 16:20:55 +00:00
parent 1b4ebce3b0
commit 9964a5c23a
2 changed files with 10 additions and 8 deletions

View File

@ -0,0 +1,7 @@
module.exports = {
public: 'public, max-age=0',
hour: 'public, max-age=' + 3600,
day: 'public, max-age=' + 86400,
year: 'public, max-age=' + 31536000,
private: 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0'
};

View File

@ -35,6 +35,7 @@ const fixtureUtils = require('./fixture-utils');
const urlServiceUtils = require('./url-service-utils');
const oldIntegrationUtils = require('./old-integration-utils');
const redirects = require('./redirects');
const cacheRules = require('./fixtures/cache-rules');
const context = require('./fixtures/context');
const DataGenerator = require('./fixtures/data-generator');
const filterData = require('./fixtures/filter-param');
@ -120,7 +121,7 @@ let ghostServer;
*
* @TODO: tidy up the tmp folders
*/
const startGhost = function startGhost(options) {
const startGhost = async function startGhost(options) {
console.time('Start Ghost'); // eslint-disable-line no-console
options = _.merge({
redirectsFile: true,
@ -390,11 +391,5 @@ module.exports = {
contributor: DataGenerator.Content.roles[4].id
}
},
cacheRules: {
public: 'public, max-age=0',
hour: 'public, max-age=' + 3600,
day: 'public, max-age=' + 86400,
year: 'public, max-age=' + 31536000,
private: 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0'
}
cacheRules: cacheRules
};