File python-azure-agent-disable-test-check-pid.diff of Package python-azure-agent.2437
Index: WALinuxAgent-2.1.3/tests/distro/test_daemon.py
===================================================================
--- WALinuxAgent-2.1.3.orig/tests/distro/test_daemon.py 2016-01-26 16:26:17.000000000 +0100
+++ WALinuxAgent-2.1.3/tests/distro/test_daemon.py 2016-04-15 18:22:12.766830928 +0200
@@ -47,19 +47,6 @@
mock_sleep.assert_any_call(15)
self.assertEquals(2, distro.daemon_handler.daemon.call_count)
- @patch("azurelinuxagent.distro.default.daemon.conf")
- @patch("azurelinuxagent.distro.default.daemon.sys.exit")
- def test_check_pid(self, mock_exit, mock_conf, mock_sleep):
- distro = get_distro()
- mock_pid_file = os.path.join(self.tmp_dir, "pid")
- mock_conf.get_agent_pid_file_path = Mock(return_value=mock_pid_file)
-
- distro.daemon_handler.check_pid()
- self.assertTrue(os.path.isfile(mock_pid_file))
-
- distro.daemon_handler.check_pid()
- mock_exit.assert_any_call(0)
-
if __name__ == '__main__':
unittest.main()