From 2911a38229c01e117832b1949596435181a59b69 Mon Sep 17 00:00:00 2001 From: "ricow@google.com" Date: Thu, 18 Jun 2015 17:54:02 +0000 Subject: [PATCH] Fix test expectations for download_from_google_storage_unittests.py This does not seem to be run by the bots, otherwise they should be red R=hinoka@google.com, iannucci@google.com BUG= Review URL: https://codereview.chromium.org/1188643008 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295741 0039d316-1c4b-4281-b951-d872f2087c98 --- .../download_from_google_storage_unittests.py | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/tests/download_from_google_storage_unittests.py b/tests/download_from_google_storage_unittests.py index abdca72a5..a8af63b0c 100755 --- a/tests/download_from_google_storage_unittests.py +++ b/tests/download_from_google_storage_unittests.py @@ -23,7 +23,7 @@ import download_from_google_storage # ../third_party/gsutil/gsutil GSUTIL_DEFAULT_PATH = os.path.join( os.path.dirname(os.path.dirname(os.path.abspath(__file__))), - 'third_party', 'gsutil', 'gsutil') + 'gsutil.py') TEST_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -169,12 +169,11 @@ class DownloadTests(unittest.TestCase): ('check_call', ('ls', input_filename)), ('check_call', - ('cp', '-q', input_filename, output_filename))] + ('cp', input_filename, output_filename))] if sys.platform != 'win32': expected_calls.append( ('check_call', - ('ls', - '-L', + ('stat', 'gs://sometesturl/7871c8e24da15bad8b0be2c36edc9dc77e37727f'))) expected_output = [ '0> Downloading %s...' % output_filename] @@ -210,7 +209,7 @@ class DownloadTests(unittest.TestCase): 0, self.queue, False, self.base_url, self.gsutil, stdout_queue, self.ret_codes, True) expected_output = [ - '0> File %s for %s does not exist, skipping.' % ( + '0> Failed to fetch file %s for %s, skipping. [Err: ]' % ( input_filename, output_filename), ] expected_calls = [ @@ -218,7 +217,7 @@ class DownloadTests(unittest.TestCase): ('ls', input_filename)) ] expected_ret_codes = [ - (1, 'File %s for %s does not exist.' % ( + (1, 'Failed to fetch file %s for %s. [Err: ]' % ( input_filename, output_filename)) ] self.assertEqual(list(stdout_queue.queue), expected_output) @@ -248,13 +247,12 @@ class DownloadTests(unittest.TestCase): ('check_call', ('ls', input_filename)), ('check_call', - ('cp', '-q', input_filename, output_filename)) + ('cp', input_filename, output_filename)) ] if sys.platform != 'win32': expected_calls.append( ('check_call', - ('ls', - '-L', + ('stat', 'gs://sometesturl/7871c8e24da15bad8b0be2c36edc9dc77e37727f'))) self.assertEqual(self.gsutil.history, expected_calls) self.assertEqual(code, 101) @@ -280,12 +278,11 @@ class DownloadTests(unittest.TestCase): ('check_call', ('ls', input_filename)), ('check_call', - ('cp', '-q', input_filename, output_filename))] + ('cp', input_filename, output_filename))] if sys.platform != 'win32': expected_calls.append( ('check_call', - ('ls', - '-L', + ('stat', 'gs://sometesturl/7871c8e24da15bad8b0be2c36edc9dc77e37727f'))) self.assertEqual(self.gsutil.history, expected_calls) self.assertEqual(code, 0)