Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c798d8fd8f |
@@ -30,6 +30,12 @@ class LocalSetup:
|
||||
self.env.update({"INPUT_DRAFTER": "local", "INPUT_LOCAL_URL": URL,
|
||||
"LOCAL_MODEL_API_KEY": KEY, "DOCS_REVIEW_PI_BIN": str(self.fake_pi)})
|
||||
self.argv_file = tmp / "pi-argv"
|
||||
# CI runs the suite as root, where the drafter refuses to run pi without an
|
||||
# unprivileged user. These tests are about the flow, so they run as a normal user;
|
||||
# the root refusal has its own test, which patches geteuid back to 0.
|
||||
not_root = mock.patch.object(local.os, "geteuid", return_value=1000)
|
||||
not_root.start()
|
||||
self.addCleanup(not_root.stop)
|
||||
|
||||
def pi(self, **config):
|
||||
config = {"sentinel": str(self.sentinel), "env_file": str(self.env_file),
|
||||
|
||||
Reference in new issue
Block a user