Exemplo n.º 1
0
 def testValidateOnly(self):
     request = self._Input(sysroot_path='sysroot_path',
                           build_target='board',
                           chrome_root='/path/to/chrome')
     test_controller.SimpleChromeWorkflowTest(request, self._Output(),
                                              self.validate_only_config)
     self.mock_simple_chrome_workflow_test.assert_not_called()
Exemplo n.º 2
0
 def testMissingChromeRoot(self):
     """Test SimpleChromeWorkflowTest dies when build_target not set."""
     input_proto = self._Input(build_target='board',
                               sysroot_path='/sysroot/dir',
                               chrome_root=None)
     with self.assertRaises(cros_build_lib.DieSystemExit):
         test_controller.SimpleChromeWorkflowTest(input_proto, None,
                                                  self.api_config)
Exemplo n.º 3
0
    def testSimpleChromeWorkflowTest(self):
        """Call SimpleChromeWorkflowTest with valid args and temp dir."""
        request = self._Input(sysroot_path='sysroot_path',
                              build_target='board',
                              chrome_root='/path/to/chrome')
        response = self._Output()

        test_controller.SimpleChromeWorkflowTest(request, response,
                                                 self.api_config)
        self.mock_simple_chrome_workflow_test.assert_called()
Exemplo n.º 4
0
    def testMockCall(self):
        """Test mock call does not execute any logic, returns success."""
        patch = self.mock_simple_chrome_workflow_test = self.PatchObject(
            test_service, 'SimpleChromeWorkflowTest')

        request = self._Input(sysroot_path='sysroot_path',
                              build_target='board',
                              chrome_root='/path/to/chrome')
        rc = test_controller.SimpleChromeWorkflowTest(request, self._Output(),
                                                      self.mock_call_config)
        patch.assert_not_called()
        self.assertEqual(controller.RETURN_CODE_SUCCESS, rc)