Пример #1
0
 def test_lxc_wrap(self):
     cmd = ["bash"]
     wrapped_cmd = lxc_wrap(self.flow_obj, cmd)
     expected_cmd = [
         "sudo",
         "bash",
         "-c",
         (
             "timelimit -p -q -t 5 -T 10 -- "
             "lxc-wait -n flow_{0} -s STOPPED && "
             "timelimit -t 5 -T 10 -- lxc-start -n flow_{0} -- bash"
         ).format(self.flow_obj.id),
     ]
     self.assertEqual(wrapped_cmd, expected_cmd)
Пример #2
0
 def wrap_in_lxc(self, command):
     return lxc_wrap(self.flow, command)