test_java_isolation_rootfs.py (1654:fc7d0578e124) test_java_isolation_rootfs.py (1706:a1da56837554)
1import os
2import subprocess
3
4import pytest
5
6from conftest import option
7from unit.applications.lang.java import TestApplicationJava
8

--- 17 unchanged lines hidden (view full) ---

26 option.current_dir + "/build",
27 option.temp_dir + "/jars",
28 ],
29 stderr=subprocess.STDOUT,
30 )
31
32 process.communicate()
33
1import os
2import subprocess
3
4import pytest
5
6from conftest import option
7from unit.applications.lang.java import TestApplicationJava
8

--- 17 unchanged lines hidden (view full) ---

26 option.current_dir + "/build",
27 option.temp_dir + "/jars",
28 ],
29 stderr=subprocess.STDOUT,
30 )
31
32 process.communicate()
33
34 except KeyboardInterrupt:
35 raise
36
34 except:
37 except:
35 pytest.fail('Cann\'t run mount process.')
38 pytest.fail('Can\'t run mount process.')
36
37 def teardown_method(self, is_su):
38 if not is_su:
39 return
40
41 try:
42 process = subprocess.Popen(
43 ["umount", "--lazy", option.temp_dir + "/jars"],
44 stderr=subprocess.STDOUT,
45 )
46
47 process.communicate()
48
39
40 def teardown_method(self, is_su):
41 if not is_su:
42 return
43
44 try:
45 process = subprocess.Popen(
46 ["umount", "--lazy", option.temp_dir + "/jars"],
47 stderr=subprocess.STDOUT,
48 )
49
50 process.communicate()
51
52 except KeyboardInterrupt:
53 raise
54
49 except:
55 except:
50 pytest.fail('Cann\'t run mount process.')
56 pytest.fail('Can\'t run mount process.')
51
52 def test_java_isolation_rootfs_chroot_war(self, is_su, temp_dir):
53 if not is_su:
54 pytest.skip('require root')
55
56 isolation = {
57 'rootfs': temp_dir,
58 }

--- 15 unchanged lines hidden ---
57
58 def test_java_isolation_rootfs_chroot_war(self, is_su, temp_dir):
59 if not is_su:
60 pytest.skip('require root')
61
62 isolation = {
63 'rootfs': temp_dir,
64 }

--- 15 unchanged lines hidden ---