Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2253)

Unified Diff: appengine/findit/waterfall/test/build_util_test.py

Issue 2007783003: [Findit] Make sure build data is updated when use build master. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: . Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/findit/waterfall/build_util.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/test/build_util_test.py
diff --git a/appengine/findit/waterfall/test/build_util_test.py b/appengine/findit/waterfall/test/build_util_test.py
index 03b8da933e73fe49f40e67457b3f2cf190221d71..99dd4541a12dd625bb71946794fa048705bb4383 100644
--- a/appengine/findit/waterfall/test/build_util_test.py
+++ b/appengine/findit/waterfall/test/build_util_test.py
@@ -147,3 +147,22 @@ class BuildUtilTest(wf_testcase.WaterfallTestCase):
build_util.DownloadBuildData(master_name, builder_name, build_number)
self.assertEqual(build.data_source, build_util.BUILDBOT_MASTER)
+
+ def testDownloadBuildDataSourceFromBMUpateBuildData(self):
+ master_name = 'm'
+ builder_name = 'b'
+ build_number = 123
+ build = WfBuild.Create(master_name, builder_name, build_number)
+ build.data = 'Original build data'
+ build.last_crawled_time = self._TimeBeforeNowBySeconds(360)
+ build.put()
+
+ self.UpdateUnitTestConfigSettings(
+ 'download_build_data_settings', {'use_chrome_build_extract': False})
+ self._MockUrlfetchWithBuildData(master_name, builder_name, build_number,
+ build_data='Test get build data')
+
+ build_util.DownloadBuildData(master_name, builder_name, build_number)
+
+ self.assertEqual(build.data_source, build_util.BUILDBOT_MASTER)
+ self.assertEqual(build.data, 'Test get build data from build master')
« no previous file with comments | « appengine/findit/waterfall/build_util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698