mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Skip policy consumption test when the rule server is not enabled
This commit is contained in:
parent
4537cf0d8a
commit
afb0fd5a23
@ -190,4 +190,4 @@ web:
|
|||||||
# A web API for a description of all the combined rules from watched banlists.
|
# A web API for a description of all the combined rules from watched banlists.
|
||||||
# GET /api/1/ruleserver/updates
|
# GET /api/1/ruleserver/updates
|
||||||
ruleServer:
|
ruleServer:
|
||||||
enabled: true
|
enabled: false
|
||||||
|
@ -40,13 +40,21 @@ async function waitForRuleChange(thunk): Promise<void> {
|
|||||||
|
|
||||||
describe("Test: that policy lists are consumed by the associated synapse module", function () {
|
describe("Test: that policy lists are consumed by the associated synapse module", function () {
|
||||||
this.afterEach(async function () {
|
this.afterEach(async function () {
|
||||||
this.timeout(5000)
|
if(config.web.ruleServer.enabled) {
|
||||||
LogService.debug('policyConsumptionTest', `Rules at end of test ${JSON.stringify(await currentRules(), null, 2)}`);
|
this.timeout(5000)
|
||||||
const mjolnir = config.RUNTIME.client!;
|
LogService.debug('policyConsumptionTest', `Rules at end of test ${JSON.stringify(await currentRules(), null, 2)}`);
|
||||||
// Clear any state associated with the account.
|
const mjolnir = config.RUNTIME.client!;
|
||||||
await mjolnir.setAccountData('org.matrix.mjolnir.watched_lists', {
|
// Clear any state associated with the account.
|
||||||
references: [],
|
await mjolnir.setAccountData('org.matrix.mjolnir.watched_lists', {
|
||||||
});
|
references: [],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.beforeAll(async function() {
|
||||||
|
if (!config.web.ruleServer.enabled) {
|
||||||
|
LogService.warn("policyConsumptionTest", "Skipping policy consumption test because the ruleServer is not enabled")
|
||||||
|
this.skip();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.beforeEach(async function () {
|
this.beforeEach(async function () {
|
||||||
this.timeout(1000);
|
this.timeout(1000);
|
||||||
|
Loading…
Reference in New Issue
Block a user