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.
|
||||
# GET /api/1/ruleserver/updates
|
||||
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 () {
|
||||
this.afterEach(async function () {
|
||||
this.timeout(5000)
|
||||
LogService.debug('policyConsumptionTest', `Rules at end of test ${JSON.stringify(await currentRules(), null, 2)}`);
|
||||
const mjolnir = config.RUNTIME.client!;
|
||||
// Clear any state associated with the account.
|
||||
await mjolnir.setAccountData('org.matrix.mjolnir.watched_lists', {
|
||||
references: [],
|
||||
});
|
||||
if(config.web.ruleServer.enabled) {
|
||||
this.timeout(5000)
|
||||
LogService.debug('policyConsumptionTest', `Rules at end of test ${JSON.stringify(await currentRules(), null, 2)}`);
|
||||
const mjolnir = config.RUNTIME.client!;
|
||||
// Clear any state associated with the account.
|
||||
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.timeout(1000);
|
||||
|
Loading…
Reference in New Issue
Block a user