SC Lighting PC joined: VISTA key and Restart key, rtpMIDI watched on MIDI
- a helper program (rtpMIDI) on a computer that joins after the MIDI key exists is added to it (it was marked seen and never added) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -559,3 +559,17 @@ class TestJoinWindowsAdmin(unittest.TestCase):
|
||||
check = text.index("IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)")
|
||||
self.assertLess(check, text.index("Get-WindowsCapability")) # before anything needs it
|
||||
self.assertIn("Run as administrator", text)
|
||||
|
||||
|
||||
class TestHelperJoinsLater(unittest.TestCase):
|
||||
def test_rtpmidi_on_a_pc_that_joins_later_lands_on_the_midi_key(self):
|
||||
inv = small()
|
||||
inv["computers"].pop("lighting_pc")
|
||||
cfg, seen = ac.build(BASE, inv, {"id": "sc", "name": "Southcoast"}, "1234")
|
||||
midi = next((t for t in cfg["tiles"] if any(c.get("type") == "midi_wired" for c in t.get("checks", []))), None)
|
||||
self.assertIsNotNone(midi) # the MIDI key is there first
|
||||
new, added, now_seen = ac.extend(cfg, small(), seen)
|
||||
midi = next(t for t in new["tiles"] if any(c.get("type") == "midi_wired" for c in t.get("checks", [])))
|
||||
self.assertTrue(any((c.get("params") or {}).get("exe") == "rtpMIDI.exe" for c in midi["checks"]), added)
|
||||
self.assertTrue(any("RTPMIDI" in a for a in added), added)
|
||||
self.assertEqual(schema.validate(new)[0], [])
|
||||
|
||||
Reference in New Issue
Block a user