Add new configallowinsecurerepositories to the test framework
authorMichael Vogt <mvo@ubuntu.com>
Tue, 14 Oct 2014 15:00:56 +0000 (17:00 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Tue, 14 Oct 2014 15:00:56 +0000 (17:00 +0200)
Add a new configallowinsecurerepositories that controls the value
of Acquire::AllowInsecureRepositories for the tests. Set it to
"false" for most of the testsuite and only enable it where its
really needed. We want to switch the default for this post-jessie.

test/integration/framework
test/integration/test-apt-update-ims

index 160df93..96b8677 100644 (file)
@@ -243,6 +243,10 @@ setupenvironment() {
        echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary
        configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
 
+        # Acquire::AllowInsecureRepositories=false is not yet the default
+        # but we want it to be the default soon
+        configallowinsecurerepositories "false";
+
        # cleanup the environment a bit
         # prefer our apt binaries over the system apt binaries
        export PATH="${BUILDDIRECTORY}:${PATH}:/usr/local/sbin:/usr/sbin:/sbin"
@@ -317,6 +321,11 @@ configdpkg() {
        fi
 }
 
+configallowinsecurerepositories() {
+    echo "Acquire::AllowInsecureRepositories \"$1\";" >  rootdir/etc/apt/apt.conf.d/allow-insecure-repositories.conf
+
+}
+
 configcompression() {
        while [ -n "$1" ]; do
                case "$1" in
index 06b9c2b..c74058c 100755 (executable)
@@ -64,6 +64,8 @@ runtest
 
 
 # no Release.gpg or InRelease
+configallowinsecurerepositories "true"
+
 msgmsg "Release only"
 EXPECT="Ign http://localhost:8080 unstable InRelease
   404  Not Found