Skip to content

Commit

Permalink
add a missed change for retries (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
hopkiw authored and Zach Marano committed Nov 13, 2019
1 parent 586528f commit 4dcea10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _DownloadAuthUrl(self, url, dest_dir):

if not self.token:
response = self.watcher.GetMetadata(
self.token_metadata_key, recursive=False, retry=False)
self.token_metadata_key, recursive=False, retries=1)

if not response:
self.logger.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def testDownloadAuthUrlExceptionAndToken(
# GetMetadata includes a prefix, so remove it.
stripped_url = token_url.replace(metadata_prefix, '')
mock_get_metadata.assert_called_once_with(
stripped_url, recursive=False, retry=False)
stripped_url, recursive=False, retries=1)

self.assertEqual(self.retriever.token, 'foo bar')

Expand Down Expand Up @@ -119,7 +119,7 @@ def testDownloadAuthUrlFallback(
prefix = 'http://metadata.google.internal/computeMetadata/v1/'
stripped_url = token_url.replace(prefix, '')
mock_get_metadata.assert_called_once_with(
stripped_url, recursive=False, retry=False)
stripped_url, recursive=False, retries=1)
mock_download_url.assert_called_once_with(auth_url, self.dest_dir)

self.assertIsNone(self.retriever.token)
Expand Down

0 comments on commit 4dcea10

Please sign in to comment.