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

Unified Diff: bin/cbuildbot_unittest.py

Issue 5344002: Update cbuildbot.py and prebuilt.py to deduplicate preflight prebuilts. (Closed) Base URL: None@preflight_upload
Patch Set: Address comments by dianders. Created 10 years, 1 month 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
Index: bin/cbuildbot_unittest.py
diff --git a/bin/cbuildbot_unittest.py b/bin/cbuildbot_unittest.py
index 9e49e376d5c888c31ee04f3ed6244a33c76ad371..9a308550c459f84ac389a0e1d8718d0a1de74a53 100755
--- a/bin/cbuildbot_unittest.py
+++ b/bin/cbuildbot_unittest.py
@@ -228,18 +228,26 @@ class CBuildBotTest(mox.MoxTestBase):
def testUploadPublicPrebuilts(self):
"""Test _UploadPrebuilts with a public location."""
- check = mox.And(mox.IsA(list), mox.In('gs://chromeos-prebuilt'))
+ binhost = 'http://www.example.com'
+ binhosts = [binhost, None]
+ check = mox.And(mox.IsA(list), mox.In(binhost), mox.Not(mox.In(None)),
+ mox.In('gs://chromeos-prebuilt'))
cbuildbot.RunCommand(check, cwd='%s/src/scripts' % self._buildroot)
self.mox.ReplayAll()
- cbuildbot._UploadPrebuilts(self._buildroot, self._test_board, 'public')
+ cbuildbot._UploadPrebuilts(self._buildroot, self._test_board, 'public',
+ binhosts)
self.mox.VerifyAll()
def testUploadPrivatePrebuilts(self):
"""Test _UploadPrebuilts with a private location."""
- check = mox.And(mox.IsA(list), mox.In('chromeos-images:/var/www/prebuilt/'))
+ binhost = 'http://www.example.com'
+ binhosts = [binhost, None]
+ check = mox.And(mox.IsA(list), mox.In(binhost), mox.Not(mox.In(None)),
+ mox.In('chromeos-images:/var/www/prebuilt/'))
cbuildbot.RunCommand(check, cwd='%s/src/scripts' % self._buildroot)
self.mox.ReplayAll()
- cbuildbot._UploadPrebuilts(self._buildroot, self._test_board, 'private')
+ cbuildbot._UploadPrebuilts(self._buildroot, self._test_board, 'private',
+ binhosts)
self.mox.VerifyAll()
« no previous file with comments | « bin/cbuildbot.py ('k') | chromite/lib/binpkg.py » ('j') | chromite/lib/binpkg.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698