From c9b423d6d3fde0132ee6f31d69a1c1370a89ce1a Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 17 Jun 2019 06:38:58 +0200 Subject: tests/vm: ubuntu.i386: apt proxy setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure apt proxy so package downloads can be cached and can pass firewalls. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190617043858.8290-12-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/ubuntu.i386 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/vm') diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 3ea459ee20..38f740eabf 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -51,6 +51,10 @@ class UbuntuX86VM(basevm.BaseVM): " ssh-authorized-keys:\n", " - %s\n" % basevm.SSH_PUB_KEY, "locale: en_US.UTF-8\n"]) + proxy = os.environ.get("http_proxy") + if not proxy is None: + udata.writelines(["apt:\n", + " proxy: %s" % proxy]) udata.close() subprocess.check_call(["genisoimage", "-output", "cloud-init.iso", "-volid", "cidata", "-joliet", "-rock", -- cgit v1.2.3