#!/bin/bash
set -eu

TESTDIR=$(readlink -f $(dirname $0))

. $TESTDIR/framework-without-repo
prereq $TESTDIR/try-apt-method-http-when-allowed-only-proxy

# use the saved value
msgmsg "Setting http_proxy env: $APT_TEST_HTTP_PROXY"
export http_proxy="$APT_TEST_HTTP_PROXY"

testsuccess aptget update

testpkgnotinstalled 'simple-package'
testsuccess aptget install 'simple-package'
testpkginstalled 'simple-package'
