Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Cisphyx committed Jan 14, 2025
1 parent cd7d1a8 commit 7c72475
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions synapse/tests/test_lib_agenda.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,11 +1117,11 @@ async def task():
async def test_cron_creator_migration(self):
async with self.getRegrCore('cron-creator-to-user') as core:
msgs = await core.stormlist('cron.list')
self.stormIsInPrint('root root 1ec949d8', msgs)
self.stormIsInPrint('testuser testuser 8fb20efd', msgs)
self.stormIsInPrint('root root 1ec949d8', msgs, whitespace=False)
self.stormIsInPrint('testuser testuser 8fb20efd', msgs, whitespace=False)

msgs = await core.stormlist('trigger.list')
self.stormIsInPrint('testuser testuser 2b61c302', msgs)
self.stormIsInPrint('testuser testuser 2b61c302', msgs, whitespace=False)

rules = await core.callStorm('return($lib.auth.users.byname(testuser).getRules())')
self.isin((True, ('cron', 'set', 'user')), rules)
Expand Down Expand Up @@ -1167,8 +1167,8 @@ def nouser(self):

# These should still display correctly before being migrated
msgs = await core2.stormlist('cron.list')
self.stormIsInPrint('root root 1ec949d8', msgs)
self.stormIsInPrint('testuser testuser 8fb20efd', msgs)
self.stormIsInPrint('root root 1ec949d8', msgs, whitespace=False)
self.stormIsInPrint('testuser testuser 8fb20efd', msgs, whitespace=False)

# Edits to creator from an old leader are handled by an updated mirror
user = await core1.auth.getUserByName('roleuser')
Expand All @@ -1177,8 +1177,8 @@ def nouser(self):
await core2.sync()

msgs = await core2.stormlist('cron.list')
self.stormIsInPrint('roleuser roleuser 1ec949d8', msgs)
self.stormIsInPrint('testuser testuser 8fb20efd', msgs)
self.stormIsInPrint('roleuser roleuser 1ec949d8', msgs, whitespace=False)
self.stormIsInPrint('testuser testuser 8fb20efd', msgs, whitespace=False)

for view in core1.views.values():
for iden, trig in view.triggers.list():
Expand All @@ -1189,14 +1189,14 @@ def nouser(self):
self.none(trig.tdef.get('creator'))

msgs = await core2.stormlist('trigger.list')
self.stormIsInPrint('testuser testuser 2b61c302', msgs)
self.stormIsInPrint('testuser testuser 2b61c302', msgs, whitespace=False)

await core1.nodes(f'$lib.trigger.get(2b61c3028a3efc87dcd99b8bfc1fbd83).set(user, {user.iden})')

await core2.sync()

msgs = await core2.stormlist('trigger.list')
self.stormIsInPrint('roleuser roleuser 2b61c302', msgs)
self.stormIsInPrint('roleuser roleuser 2b61c302', msgs, whitespace=False)

async with self.getTestCore(dirn=dirn1) as core1, \
self.getTestCore(dirn=dirn2, conf=conf) as core2:
Expand Down Expand Up @@ -1224,8 +1224,8 @@ def nouser(self):
self.eq(trig.tdef.get('creator'), trig.tdef.get('user'))

msgs = await core2.stormlist('cron.list')
self.stormIsInPrint('roleuser roleuser 1ec949d8', msgs)
self.stormIsInPrint('testuser testuser 8fb20efd', msgs)
self.stormIsInPrint('roleuser roleuser 1ec949d8', msgs, whitespace=False)
self.stormIsInPrint('testuser testuser 8fb20efd', msgs, whitespace=False)

msgs = await core2.stormlist('trigger.list')
self.stormIsInPrint('roleuser roleuser 2b61c302', msgs)
self.stormIsInPrint('roleuser roleuser 2b61c302', msgs, whitespace=False)
4 changes: 2 additions & 2 deletions synapse/tests/test_lib_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -3073,14 +3073,14 @@ async def test_cell_hive_migration(self):
self.eq('barprof', valu)

msgs = await core.stormlist('cron.list')
self.stormIsInPrint(' visi 8437c35a.. ', msgs)
self.stormIsInPrint(' visi 8437c35a.. ', msgs, whitespace=False)
self.stormIsInPrint('[tel:mob:telem=*]', msgs)

msgs = await core.stormlist('dmon.list')
self.stormIsInPrint('0973342044469bc40b577969028c5079: (foodmon ): running', msgs)

msgs = await core.stormlist('trigger.list')
self.stormIsInPrint('visi 27f5dc524e7c3ee8685816ddf6ca1326', msgs)
self.stormIsInPrint('visi 27f5dc524e7c3ee8685816ddf6ca1326', msgs, whitespace=False)
self.stormIsInPrint('[ +#count test:str=$tag ]', msgs)

msgs = await core.stormlist('testcmd0 foo')
Expand Down

0 comments on commit 7c72475

Please sign in to comment.