diff options
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/framework | 2 | ||||
-rwxr-xr-x | test/integration/test-apt-get-update-unauth-warning | 5 | ||||
-rwxr-xr-x | test/integration/test-apt-update-expected-size | 2 | ||||
-rwxr-xr-x | test/integration/test-apt-update-ims | 3 | ||||
-rwxr-xr-x | test/integration/test-apt-update-rollback | 2 | ||||
-rwxr-xr-x | test/integration/test-sourceslist-trusted-options | 27 |
6 files changed, 33 insertions, 8 deletions
diff --git a/test/integration/framework b/test/integration/framework index 76425f0c3..160df9301 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -851,7 +851,7 @@ setupaptarchive() { else setupflataptarchive fi - signreleasefiles 'Joe Sixpack' "$@" + signreleasefiles 'Joe Sixpack' if [ "1" != "$NOUPDATE" ]; then testsuccess aptget update -o Debug::pkgAcquire::Worker=true -o Debug::Acquire::gpgv=true fi diff --git a/test/integration/test-apt-get-update-unauth-warning b/test/integration/test-apt-get-update-unauth-warning index 8e212a3c4..fe0cb45a4 100755 --- a/test/integration/test-apt-get-update-unauth-warning +++ b/test/integration/test-apt-get-update-unauth-warning @@ -24,10 +24,7 @@ testequal "Ign file: unstable InRelease Err file: unstable Release File not found W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository. -W: Use --allow-insecure-repositories to force the update -W: Failed to fetch file:$APTARCHIVE/dists/unstable/Release File not found - -E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update +E: Use --allow-insecure-repositories to force the update" aptget update # no package foo testequal "Listing..." apt list foo diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size index 58920f544..a039e9e1c 100755 --- a/test/integration/test-apt-update-expected-size +++ b/test/integration/test-apt-update-expected-size @@ -38,7 +38,7 @@ echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages.gz echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)" rm -f rootdir/var/lib/apt/lists/localhost* -testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE) [IP: ::1 8080] +testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE) E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq diff --git a/test/integration/test-apt-update-ims b/test/integration/test-apt-update-ims index 8aa5a7262..06b9c2b62 100755 --- a/test/integration/test-apt-update-ims +++ b/test/integration/test-apt-update-ims @@ -73,7 +73,8 @@ Ign http://localhost:8080 unstable Release.gpg Hit http://localhost:8080 unstable/main Sources Hit http://localhost:8080 unstable/main amd64 Packages Hit http://localhost:8080 unstable/main Translation-en -Reading package lists..." +Reading package lists... +W: The data from 'http://localhost:8080 unstable Release.gpg' is not signed. Packages from that repository can not be authenticated." find aptarchive -name "Release.gpg" | xargs rm -f diff --git a/test/integration/test-apt-update-rollback b/test/integration/test-apt-update-rollback index 5b9c200fe..220c3052b 100755 --- a/test/integration/test-apt-update-rollback +++ b/test/integration/test-apt-update-rollback @@ -136,7 +136,7 @@ test_inrelease_to_unauth_inrelease() { msgmsg 'Test InRelease to InRelease without good sig' start_with_good_inrelease - signreleasefiles 'Marvin Paranoid' '+1hour' + signreleasefiles 'Marvin Paranoid' testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2 diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options index ae65cca83..1178df46a 100755 --- a/test/integration/test-sourceslist-trusted-options +++ b/test/integration/test-sourceslist-trusted-options @@ -166,3 +166,30 @@ insecureaptgetupdate everythingfails everythingfails -t stable everythingfails -t testing + +# same as the one further above, but this time testing is unsigned +find aptarchive/ \( -name 'InRelease' -o -name 'Release.gpg' \) -delete +signreleasefiles 'Joe Sixpack' 'aptarchive/dists/stable' + +msgmsg 'Test without trusted option and unsigned and good sources' +cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ +insecureaptgetupdate +everythingfails +everythingsucceeds -t stable +everythingfails -t testing + +msgmsg 'Test with trusted=yes option and unsigned and good sources' +cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ +sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/* +aptgetupdate +everythingsucceeds +everythingsucceeds -t stable +everythingsucceeds -t testing + +msgmsg 'Test with trusted=no option and unsigned and good sources' +cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ +sed -i 's#^deb\(-src\)\? #deb\1 [trusted=no] #' rootdir/etc/apt/sources.list.d/* +insecureaptgetupdate +everythingfails +everythingfails -t stable +everythingfails -t testing |