Skip to content

Commit

Permalink
Improve runner speed by not copying skeletons for virtual users
Browse files Browse the repository at this point in the history
  • Loading branch information
blechschmidt committed Jun 22, 2024
1 parent d2cf320 commit bd97738
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
10 changes: 8 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,21 @@ class PalliumTestCase(unittest.TestCase):
def test_virtuser(self):
profile = {
'sandbox': {
'virtuser': 'johndoe'
'virtuser': {
'name': 'johndoe',
'skeleton': False
}
}
}
assert pallium_exec_output(profile, ['whoami']) == 'johndoe'

def test_mv(self):
profile = {
'sandbox': {
'virtuser': 'johndoe'
'virtuser': {
'name': 'johndoe',
'skeleton': False
}
},
'run': {
'command': ['sleep', 'infinity']
Expand Down
13 changes: 4 additions & 9 deletions tests/test_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def test_gvisor(self):
def test_virtuser(self):
profile = {
"sandbox": {
"virtuser": "johndoe"
"virtuser": {
"name": "johndoe",
"skeleton": False
}
}
}
whoami_output = get_output(profile, 'whoami')
Expand Down Expand Up @@ -109,14 +112,6 @@ def test_mount(self):
assert get_output(profile, ["cat", dst]) == "Hello world", "Test bind mounting test file at " % dst


def test_mv(self):
profile = {
"sandbox": {
"virtuser": "$tmp"
}
}


if __name__ == '__main__':
assert os.getuid() != 0, "These tests should not be run as root user"
unittest.main()

0 comments on commit bd97738

Please sign in to comment.