コード例 #1
0
 def testNoBuildTargetNoSysrootFails(self):
     """Test missing build target name and sysroot path fails."""
     input_msg = self._GetInput()
     output_msg = self._GetOutput()
     with self.assertRaises(cros_build_lib.DieSystemExit):
         test_controller.DebugInfoTest(input_msg, output_msg,
                                       self.api_config)
コード例 #2
0
 def testValidateOnly(self):
     """Sanity check that a validate only call does not execute any logic."""
     patch = self.PatchObject(test_service, 'DebugInfoTest')
     input_msg = self._GetInput(sysroot_path=self.full_sysroot_path)
     test_controller.DebugInfoTest(input_msg, self._GetOutput(),
                                   self.validate_only_config)
     patch.assert_not_called()
コード例 #3
0
    def testMockCall(self):
        """Test mock call does not execute any logic, returns success."""
        patch = self.PatchObject(test_service, 'DebugInfoTest')

        input_msg = self._GetInput(sysroot_path=self.full_sysroot_path)
        rc = test_controller.DebugInfoTest(input_msg, self._GetOutput(),
                                           self.mock_call_config)
        patch.assert_not_called()
        self.assertEqual(controller.RETURN_CODE_SUCCESS, rc)
コード例 #4
0
    def testMockError(self):
        """Test mock error call does not execute any logic, returns error."""
        patch = self.PatchObject(test_service, 'DebugInfoTest')

        input_msg = self._GetInput(sysroot_path=self.full_sysroot_path)
        rc = test_controller.DebugInfoTest(input_msg, self._GetOutput(),
                                           self.mock_error_config)
        patch.assert_not_called()
        self.assertEqual(controller.RETURN_CODE_COMPLETED_UNSUCCESSFULLY, rc)
コード例 #5
0
    def testDebugInfoTest(self):
        """Call DebugInfoTest with valid sysroot_path."""
        request = self._GetInput(sysroot_path=self.full_sysroot_path)

        test_controller.DebugInfoTest(request, self._GetOutput(),
                                      self.api_config)