The PC join line says to run it as administrator before anything else runs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -550,3 +550,12 @@ class TestSwitchKeys(unittest.TestCase):
|
||||
lights = [t for t in kept_cfg["tiles"] if t["id"] == "lights"]
|
||||
self.assertEqual((len(lights), lights[0]["pos"], "LIGHTS" in kept), (1, [2, 7], True))
|
||||
self.assertEqual(len([t for t in kept_cfg["tiles"] if t.get("kind") == "autofix"]), 1)
|
||||
|
||||
|
||||
class TestJoinWindowsAdmin(unittest.TestCase):
|
||||
def test_the_pc_line_stops_with_plain_words_when_not_administrator(self):
|
||||
cfg = json.load(open(os.path.join(ROOT, "sites", "sc", "config.json")))
|
||||
text = campus.join_windows(cfg, "http://10.5.2.60:8020")
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user