Пример #1
0
 def test_not_old(self, container, now):
     container['State']['FinishedAt'] = '2014-01-21T00:00:00Z'
     assert not docker_gc.should_remove_container(container, now)
Пример #2
0
 def test_not_old_never_run(self, container, now, earlier_time):
     container['Created'] = str(now)
     container['State']['FinishedAt'] = docker_gc.YEAR_ZERO
     assert not docker_gc.should_remove_container(container, now)
Пример #3
0
 def test_old_stopped(self, container, now):
     assert docker_gc.should_remove_container(container, now)
Пример #4
0
 def test_is_running(self, container, now):
     container['State']['Running'] = True
     assert not docker_gc.should_remove_container(container, now)
Пример #5
0
 def test_is_ghost(self, container, now):
     container['State']['Ghost'] = True
     assert docker_gc.should_remove_container(container, now)
Пример #6
0
 def test_not_old(self, container, now):
     container['State']['FinishedAt'] = '2014-01-21T00:00:00Z'
     assert not docker_gc.should_remove_container(container, now)
Пример #7
0
 def test_old_stopped(self, container, now):
     assert docker_gc.should_remove_container(container, now)
Пример #8
0
 def test_not_old_never_run(self, container, now, earlier_time):
     container['Created'] = str(now)
     container['State']['FinishedAt'] = docker_gc.YEAR_ZERO
     assert not docker_gc.should_remove_container(container, now)
Пример #9
0
 def test_is_ghost(self, container, now):
     container['State']['Ghost'] = True
     assert docker_gc.should_remove_container(container, now)
Пример #10
0
 def test_is_running(self, container, now):
     container['State']['Running'] = True
     assert not docker_gc.should_remove_container(container, now)