test_push: fix the flaky get_default_build function
The get_default_build method is to get the lastest build to running
tests. However, it will fail 90% of the time because of the devserver
unreachable issue. Change the method to use gsutil to get the lastest
build.
BUG=chromium:641177
TEST=Unittest and test on the testing test_push master.
Change-Id: I33d1dfcf53a871809f4f0ecc1bfdb2febb923230
Reviewed-on: https://chromium-review.googlesource.com/379677
Tested-by: Shuqian Zhao <shuqianz@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
Commit-Queue: Shuqian Zhao <shuqianz@chromium.org>
diff --git a/site_utils/test_push_unittest.py b/site_utils/test_push_unittest.py
index 8636a7a..5837a06 100755
--- a/site_utils/test_push_unittest.py
+++ b/site_utils/test_push_unittest.py
@@ -62,9 +62,9 @@
urllib2.urlopen(mox.IgnoreArg()).AndReturn(response)
self.mox.StubOutWithMock(test_push, 'get_default_build')
- test_push.get_default_build(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(
+ test_push.get_default_build(mox.IgnoreArg()).AndReturn(
'stumpy-release/R36-5881-0.0')
- test_push.get_default_build(mox.IgnoreArg(), mox.IgnoreArg()).AndReturn(
+ test_push.get_default_build(mox.IgnoreArg()).AndReturn(
'quawks-release/R36-5881-0.0')
self.mox.StubOutWithMock(test_push, 'check_dut_image')