controller: add UNIT_TESTS artifact

BUG=b:181879769
TEST=new unit & cq

Change-Id: I5bff7500186759ffae21d3876b4d011a2a8e5214
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2979632
Commit-Queue: George Engelbrecht <engeg@google.com>
Tested-by: George Engelbrecht <engeg@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Reviewed-by: Jack Neus <jackneus@google.com>
diff --git a/api/controller/test_unittest.py b/api/controller/test_unittest.py
index 6797b76..d6819ac 100644
--- a/api/controller/test_unittest.py
+++ b/api/controller/test_unittest.py
@@ -697,6 +697,9 @@
   CODE_COVERAGE_LLVM_ARTIFACT_TYPE = (
       common_pb2.ArtifactsByService.Test.ArtifactType.CODE_COVERAGE_LLVM_JSON
   )
+  UNIT_TEST_ARTIFACT_TYPE = (
+      common_pb2.ArtifactsByService.Test.ArtifactType.UNIT_TESTS
+  )
 
   def setUp(self):
     """Set up the class for tests."""
@@ -746,17 +749,26 @@
     """Test result contains paths and code_coverage_llvm_json type."""
     self.PatchObject(test_service, 'BundleCodeCoverageLlvmJson',
       return_value='test')
+    self.PatchObject(test_service, 'BuildTargetUnitTestTarball',
+      return_value='unit_tests.tar')
 
     result = test_controller.GetArtifacts(
         common_pb2.ArtifactsByService.Test(output_artifacts=[
             # Valid
             common_pb2.ArtifactsByService.Test.ArtifactInfo(
                 artifact_types=[
+                    self.UNIT_TEST_ARTIFACT_TYPE
+                ]
+            ),
+            common_pb2.ArtifactsByService.Test.ArtifactInfo(
+                artifact_types=[
                     self.CODE_COVERAGE_LLVM_ARTIFACT_TYPE
                 ]
             ),
         ]),
         self.chroot, self.sysroot, self.tempdir)
 
-    self.assertEqual(result[0]['paths'], ['test'])
-    self.assertEqual(result[0]['type'], self.CODE_COVERAGE_LLVM_ARTIFACT_TYPE)
+    self.assertEqual(result[0]['paths'], ['unit_tests.tar'])
+    self.assertEqual(result[0]['type'], self.UNIT_TEST_ARTIFACT_TYPE)
+    self.assertEqual(result[1]['paths'], ['test'])
+    self.assertEqual(result[1]['type'], self.CODE_COVERAGE_LLVM_ARTIFACT_TYPE)