diff --git a/actions/echo b/actions/echo deleted file mode 120000 index 7bbf7ccd5..000000000 --- a/actions/echo +++ /dev/null @@ -1 +0,0 @@ -/bin/echo \ No newline at end of file diff --git a/actions/id b/actions/id deleted file mode 120000 index 5f8fa7d02..000000000 --- a/actions/id +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/id \ No newline at end of file diff --git a/tests/actions_test.py b/tests/actions_test.py index df18e40db..c78fdce72 100644 --- a/tests/actions_test.py +++ b/tests/actions_test.py @@ -2,6 +2,7 @@ # -*- mode: python; mode: auto-fill; fill-column: 80 -*- from actions import superuser_run, run +import os import shlex import subprocess import sys @@ -12,7 +13,19 @@ class TestPrivileged(unittest.TestCase): See actions.py for a full description of the expectations. + Symlink to ``echo`` and ``id`` during testing. + """ + @classmethod + def setUpClass(cls): + os.symlink("/bin/echo", "actions/echo") + os.symlink("/usr/bin/id", "actions/id") + + @classmethod + def tearDownClass(cls): + os.remove("actions/echo") + os.remove("actions/id") + def test_run_as_root(self): """1. Privileged actions run as root.