def test_list_all_containers_input_list(self, *args):
     pids = [
         c.pid for c in list_all_containers(
             user_list='102',
             ignore_raw_containers=False)]
     # pid 1 is the init process, which is not a container
     # according to the definition in container.py
     assert set(pids) == set(['102'])
     assert '3' not in pids  # filtered container
     assert '4' not in pids  # filtered container
     assert '1' not in pids  # init process
     assert '5' not in pids  # crawler process
Exemple #2
0
 def test_list_all_containers_input_list(self, *args):
     pids = [
         c.pid for c in list_all_containers(user_list='102',
                                            ignore_raw_containers=False)
     ]
     # pid 1 is the init process, which is not a container
     # according to the definition in container.py
     assert set(pids) == set(['102'])
     assert '3' not in pids  # filtered container
     assert '4' not in pids  # filtered container
     assert '1' not in pids  # init process
     assert '5' not in pids  # crawler process
 def test_list_all_containers(self, *args):
     pids = [
         c.pid for c in list_all_containers(
             ignore_raw_containers=False)]
     # pid 1 is the init process, which is not a container
     # according to the definition in container.py
     assert set(pids) == set(DOCKER_IDS + ['4'])
     assert '1' not in pids  # init process
     assert '5' not in pids  # crawler process
     assert args[0].call_count == 2
     assert args[1].call_count == 1
     assert args[2].call_count == 2
     assert args[3].call_count == 1
Exemple #4
0
 def test_list_all_containers(self, *args):
     pids = [
         c.pid for c in list_all_containers(ignore_raw_containers=False)
     ]
     # pid 1 is the init process, which is not a container
     # according to the definition in container.py
     assert set(pids) == set(DOCKER_IDS + ['4'])
     assert '1' not in pids  # init process
     assert '5' not in pids  # crawler process
     assert args[0].call_count == 2
     assert args[1].call_count == 1
     assert args[2].call_count == 2
     assert args[3].call_count == 1