mirror of
https://github.com/docker/compose.git
synced 2025-07-23 21:54:40 +02:00
Merge pull request #1480 from bfirsh/change-sigint-test-to-use-sigstop
Change kill SIGINT test to use SIGSTOP (cherry picked from commit a15f996744b4005441b289f6b3fb4eef551b5214) Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
363a6563c7
commit
8f8693e13e
@ -361,22 +361,22 @@ class CLITestCase(DockerClientTestCase):
|
||||
self.assertEqual(len(service.containers(stopped=True)), 1)
|
||||
self.assertFalse(service.containers(stopped=True)[0].is_running)
|
||||
|
||||
def test_kill_signal_sigint(self):
|
||||
def test_kill_signal_sigstop(self):
|
||||
self.command.dispatch(['up', '-d'], None)
|
||||
service = self.project.get_service('simple')
|
||||
self.assertEqual(len(service.containers()), 1)
|
||||
self.assertTrue(service.containers()[0].is_running)
|
||||
|
||||
self.command.dispatch(['kill', '-s', 'SIGINT'], None)
|
||||
self.command.dispatch(['kill', '-s', 'SIGSTOP'], None)
|
||||
|
||||
self.assertEqual(len(service.containers()), 1)
|
||||
# The container is still running. It has been only interrupted
|
||||
# The container is still running. It has only been paused
|
||||
self.assertTrue(service.containers()[0].is_running)
|
||||
|
||||
def test_kill_interrupted_service(self):
|
||||
def test_kill_stopped_service(self):
|
||||
self.command.dispatch(['up', '-d'], None)
|
||||
service = self.project.get_service('simple')
|
||||
self.command.dispatch(['kill', '-s', 'SIGINT'], None)
|
||||
self.command.dispatch(['kill', '-s', 'SIGSTOP'], None)
|
||||
self.assertTrue(service.containers()[0].is_running)
|
||||
|
||||
self.command.dispatch(['kill', '-s', 'SIGKILL'], None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user