Build API: Adding mock responses.
Complete mock responses for the api, sdk, and sysroot controllers.
Added empty mock responses for the rest of the endpoints, and bugs
have been created to complete them.
BUG=chromium:999178
TEST=run_tests
Change-Id: Ib9ead797a588a9f4ccf50a6a663ab7dbdf5d0ae8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1787937
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Tested-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Alex Klein <saklein@chromium.org>
diff --git a/api/controller/test.py b/api/controller/test.py
index f83db28..dc58e6e 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -13,6 +13,7 @@
import os
from chromite.api import controller
+from chromite.api import faux
from chromite.api import validate
from chromite.api.controller import controller_util
from chromite.api.gen.chromite.api import test_pb2
@@ -27,6 +28,7 @@
from chromite.utils import key_value_store
+@faux.all_empty
def DebugInfoTest(input_proto, _output_proto, config):
"""Run the debug info tests."""
sysroot_path = input_proto.sysroot.path
@@ -53,6 +55,7 @@
return controller.RETURN_CODE_COMPLETED_UNSUCCESSFULLY
+@faux.all_empty
@validate.require('build_target.name', 'result_path')
@validate.exists('result_path')
@validate.validation_complete
@@ -96,6 +99,7 @@
output_proto.tarball_path = tarball
+@faux.all_empty
@validate.validation_complete
def ChromiteUnitTest(_input_proto, _output_proto, _config):
"""Run the chromite unit tests."""
@@ -107,6 +111,7 @@
return controller.RETURN_CODE_COMPLETED_UNSUCCESSFULLY
+@faux.all_empty
@validate.require('build_target.name', 'vm_path.path', 'test_harness',
'vm_tests')
@validate.validation_complete
@@ -140,6 +145,7 @@
cros_build_lib.RunCommand(cmd, kill_timeout=10 * 60)
+@faux.all_empty
@validate.require('image_payload.path.path', 'cache_payloads')
@validate.validation_complete
def MoblabVmTest(input_proto, _output_proto, _config):
@@ -177,6 +183,7 @@
test.ValidateMoblabVmTest(results_dir)
+@faux.all_empty
@validate.validation_complete
def CrosSigningTest(_input_proto, _output_proto, _config):
"""Run the cros-signing unit tests."""