From 9eac802238b32c41446dc8355ee48d6b1d0c6d9a Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 5 Aug 2019 04:01:54 -0700 Subject: [PATCH] //src/test/py/bazel:bazel_external_repository_test allow plain http download 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 --- src/test/py/bazel/bazel_external_repository_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/py/bazel/bazel_external_repository_test.py b/src/test/py/bazel/bazel_external_repository_test.py index 0f0e82bdecc330..4c601ff8facb12 100644 --- a/src/test/py/bazel/bazel_external_repository_test.py +++ b/src/test/py/bazel/bazel_external_repository_test.py @@ -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' @@ -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))