Test graceful shutdown.
(self)
| 384 | """Tests for shutdown command.""" |
| 385 | |
| 386 | def test_shutdown_graceful(self): |
| 387 | """Test graceful shutdown.""" |
| 388 | arbiter = MockArbiter() |
| 389 | handlers = CommandHandlers(arbiter) |
| 390 | |
| 391 | with patch('os.kill') as mock_kill: |
| 392 | result = handlers.shutdown() |
| 393 | |
| 394 | assert result["status"] == "shutting_down" |
| 395 | assert result["mode"] == "graceful" |
| 396 | mock_kill.assert_called_once_with(12345, signal.SIGTERM) |
| 397 | |
| 398 | def test_shutdown_quick(self): |
| 399 | """Test quick shutdown.""" |
nothing calls this directly
no test coverage detected