artifacts controller: Consider no-image-dir a success.
There are now builders that do not build images, but call the
image archive endpoints. Allow calling these endpoints
successfully without producing artifacts, i.e. it successfully
produced artifacts for all existing images.
BUG=chromium:1017880
TEST=run_tests
Change-Id: I07f182fd09b1a80a7b38b8250951d1fa00cf2cd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1880271
Tested-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Alex Klein <saklein@chromium.org>
Reviewed-by: Sean Abraham <seanabraham@chromium.org>
diff --git a/api/controller/artifacts_unittest.py b/api/controller/artifacts_unittest.py
index 32af5b8..d11a595 100644
--- a/api/controller/artifacts_unittest.py
+++ b/api/controller/artifacts_unittest.py
@@ -528,9 +528,9 @@
def testBundleTestUpdatePayloadsNoImageDir(self):
"""BundleTestUpdatePayloads dies if no image dir is found."""
# Intentionally do not write image directory.
- with self.assertRaises(cros_build_lib.DieSystemExit):
- artifacts.BundleTestUpdatePayloads(self.input_proto, self.output_proto,
- self.api_config)
+ artifacts.BundleTestUpdatePayloads(self.input_proto, self.output_proto,
+ self.api_config)
+ self.assertFalse(self.output_proto.artifacts)
def testBundleTestUpdatePayloadsNoImage(self):
"""BundleTestUpdatePayloads dies if no usable image is found for target."""