chromite/api: add the full depgraph to depgraph's response message directly
BUG=chromium:957707
TEST=run `./bin/build_api chromite.api.DependencyService/GetBuildDependencyGraph --input-json=input.json --output-json=output.json` and verifies output.json file contains the depgraph data directly.
Change-Id: I245e7481c6f47dd5be316661d7bca804628145ef
Reviewed-on: https://chromium-review.googlesource.com/1592843
Commit-Ready: Ned Nguyen <nednguyen@google.com>
Tested-by: Ned Nguyen <nednguyen@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Reviewed-by: Sean Abraham <seanabraham@chromium.org>
diff --git a/api/controller/board_build_dependency_unittest.py b/api/controller/board_build_dependency_unittest.py
index c64623a..b9f90a6 100644
--- a/api/controller/board_build_dependency_unittest.py
+++ b/api/controller/board_build_dependency_unittest.py
@@ -7,6 +7,7 @@
from __future__ import print_function
from chromite.api.controller import board_build_dependency
+from chromite.api.gen.chromite.api import depgraph_pb2
from chromite.lib import cros_test_lib
@@ -55,8 +56,9 @@
},
}
- depgraph_proto = board_build_dependency.CreateDepGraphProtoFromJsonMap(
- json_deps)
+ depgraph_proto = depgraph_pb2.DepGraph()
+ board_build_dependency.AugmentDepGraphProtoFromJsonMap(
+ json_deps, depgraph_proto)
self.assertEqual(depgraph_proto.build_target.name, 'deathstar')
darthvader_dep = None
for package_dep_info in depgraph_proto.package_deps: