Skip to content

Commit

Permalink
//src/test/py/bazel:bazel_external_repository_test allow plain http d…
Browse files Browse the repository at this point in the history
…ownload from 127.0.0.1

The loopback device is usually safe against man-in-the-middle attacks,
so allow these downloads in said test in preparation of #8607.

Change-Id: I9bc7c61719aea5a19350ea5f7af7ecce99387b5a
PiperOrigin-RevId: 261656498
  • Loading branch information
aehlig authored and copybara-github committed Aug 5, 2019
1 parent 41cfcc7 commit 9eac802
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/py/bazel/bazel_external_repository_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ def testNewHttpArchive(self):
self.ScratchFile('third_party/BUILD')
self.ScratchFile('third_party/six.BUILD', build_file)

exit_code, _, stderr = self.RunBazel(['build', '@six_archive//...'])
exit_code, _, stderr = self.RunBazel([
'build', '--noincompatible_disallow_unverified_http_downloads',
'@six_archive//...'
])
self.assertEqual(exit_code, 0, os.linesep.join(stderr))

fetching_disabled_msg = 'fetching is disabled'
Expand Down Expand Up @@ -130,6 +133,7 @@ def testNewHttpArchiveWithSymlinks(self):
self.ScratchFile('BUILD')
exit_code, _, stderr = self.RunBazel([
'build',
'--noincompatible_disallow_unverified_http_downloads',
'@archive_with_symlink//:file-A',
])
self.assertEqual(exit_code, 0, os.linesep.join(stderr))
Expand Down

0 comments on commit 9eac802

Please sign in to comment.