diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2016-09-30 13:00:24 +0100 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2016-10-06 12:06:04 +0100 |
commit | c924e6477c90bb64a9f79ed317527cc9ada9e3e3 (patch) | |
tree | f3ec42d937e331b29574a3dc807b98e5fac548dc | |
parent | f66ce361bbdc6523e729806bd304db0a558e5928 (diff) | |
download | sandboxlib-c924e6477c90bb64a9f79ed317527cc9ada9e3e3.tar.gz |
Change some tests to pass as non-root
Change some tests to pass if they are run as non-root. The
linux-user-chroot tool seems to require that the absolute location of
the binary to execute in the sandbox is given if called as non-root.
-rw-r--r-- | tests/test_all.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_all.py b/tests/test_all.py index 9270607..197dc37 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -83,7 +83,7 @@ class TestMounts(object): def test_mount_proc(self, sandboxlib_executor, mounts_test_sandbox): exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-or-directory-exists', '/proc'], + ['/bin/test-file-or-directory-exists', '/proc'], filesystem_root=str(mounts_test_sandbox), extra_mounts=[(None, '/proc', 'proc')]) @@ -93,7 +93,7 @@ class TestMounts(object): def test_mount_tmpfs(self, sandboxlib_executor, mounts_test_sandbox): exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-or-directory-exists', '/dev/shm'], + ['/bin/test-file-or-directory-exists', '/dev/shm'], filesystem_root=str(mounts_test_sandbox), extra_mounts=[(None, '/dev/shm', 'tmpfs')]) @@ -125,7 +125,7 @@ class TestWriteablePaths(object): pytest.xfail("chroot backend doesn't support read-only paths.") exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths='none') @@ -140,7 +140,7 @@ class TestWriteablePaths(object): pytest.xfail("chroot backend doesn't support read-only paths.") exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths=['/data/1']) @@ -152,7 +152,7 @@ class TestWriteablePaths(object): def test_all_writable(self, sandboxlib_executor, writable_paths_test_sandbox): exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths='all') @@ -167,7 +167,7 @@ class TestWriteablePaths(object): pytest.xfail("chroot backend doesn't support read-only paths.") exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths='none') @@ -182,7 +182,7 @@ class TestWriteablePaths(object): pytest.xfail("chroot backend doesn't support read-only paths.") exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths=['/data']) |