diff --git a/ghost/core/core/server/services/settings/settings-service.js b/ghost/core/core/server/services/settings/settings-service.js index 8e2745c4373..75e723af89f 100644 --- a/ghost/core/core/server/services/settings/settings-service.js +++ b/ghost/core/core/server/services/settings/settings-service.js @@ -78,7 +78,7 @@ module.exports = { SettingsCache.init(events, settingsCollection, this.getCalculatedFields(), cacheStore, settingsOverrides); // Validate site_uuid matches config - await this.validateSiteUuid(); + this.validateSiteUuid(); }, /** @@ -158,7 +158,7 @@ module.exports = { * The configured site_uuid is only used once when the site_uuid setting is set in a migration * Exits with an error if they differ */ - async validateSiteUuid() { + validateSiteUuid() { const configSiteUuid = config.get('site_uuid'); const settingSiteUuid = SettingsCache.get('site_uuid'); diff --git a/ghost/core/test/unit/server/services/settings/settings-service.test.js b/ghost/core/test/unit/server/services/settings/settings-service.test.js index 68ea5fc48fb..1026f52ff5b 100644 --- a/ghost/core/test/unit/server/services/settings/settings-service.test.js +++ b/ghost/core/test/unit/server/services/settings/settings-service.test.js @@ -32,53 +32,53 @@ describe('UNIT: Settings Service', function () { }); describe('validateSiteUuid', function () { - it('should pass when config and setting UUIDs match', async function () { + it('should pass when config and setting UUIDs match', function () { const uuid = '12345678-1234-1234-1234-123456789abc'; configUtils.set('site_uuid', uuid); settingsCacheStub.withArgs('site_uuid').returns(uuid); // Should not throw - await settingsService.validateSiteUuid(); + settingsService.validateSiteUuid(); }); - it('should pass when config and setting UUIDs match with different cases', async function () { + it('should pass when config and setting UUIDs match with different cases', function () { configUtils.set('site_uuid', '12345678-1234-1234-1234-123456789ABC'); settingsCacheStub.withArgs('site_uuid').returns('12345678-1234-1234-1234-123456789abc'); // Should not throw - await settingsService.validateSiteUuid(); + settingsService.validateSiteUuid(); }); - it('should pass when config UUID is not set', async function () { + it('should pass when config UUID is not set', function () { configUtils.set('site_uuid', null); settingsCacheStub.withArgs('site_uuid').returns('12345678-1234-1234-1234-123456789abc'); // Should not throw - await settingsService.validateSiteUuid(); + settingsService.validateSiteUuid(); }); - it('should pass when setting UUID is not set', async function () { + it('should pass when setting UUID is not set', function () { configUtils.set('site_uuid', '12345678-1234-1234-1234-123456789abc'); settingsCacheStub.withArgs('site_uuid').returns(null); // Should not throw - await settingsService.validateSiteUuid(); + settingsService.validateSiteUuid(); }); - it('should pass when both UUIDs are not set', async function () { + it('should pass when both UUIDs are not set', function () { configUtils.set('site_uuid', null); settingsCacheStub.withArgs('site_uuid').returns(null); // Should not throw - await settingsService.validateSiteUuid(); + settingsService.validateSiteUuid(); }); - it('should throw IncorrectUsageError when UUIDs do not match', async function () { + it('should throw IncorrectUsageError when UUIDs do not match', function () { configUtils.set('site_uuid', '12345678-1234-1234-1234-123456789abc'); settingsCacheStub.withArgs('site_uuid').returns('87654321-4321-4321-4321-cba987654321'); try { - await settingsService.validateSiteUuid(); + settingsService.validateSiteUuid(); assert.fail('Should have thrown IncorrectUsageError'); } catch (error) { sinon.assert.calledOnce(loggingStub);