From 29a08d8ab0c4d82f26c2712c456508784040cdbb Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 28 Jun 2017 15:52:00 +0200 Subject: Fix https->http redirect issues Gbp-Dch: ignore --- test/integration/test-apt-https-no-redirect | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-apt-https-no-redirect b/test/integration/test-apt-https-no-redirect index d6c630d5f..05e97159c 100755 --- a/test/integration/test-apt-https-no-redirect +++ b/test/integration/test-apt-https-no-redirect @@ -14,7 +14,7 @@ echo 'alright' > aptarchive/working changetohttpswebserver webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "http://localhost:${APTHTTPPORT}/" webserverconfig 'aptwebserver::redirect::replace::/redirectme2/' "https://localhost:${APTHTTPSPORT}/" -echo 'Dir::Bin::Methods::https+http "https";' > rootdir/etc/apt/apt.conf.d/99add-https-http-method +echo 'Dir::Bin::Methods::https+http "http";' > rootdir/etc/apt/apt.conf.d/99add-https-http-method msgtest 'download of a file works via' 'http' testsuccess --nomsg downloadfile "http://localhost:${APTHTTPPORT}/working" httpfile @@ -26,13 +26,9 @@ testfileequal httpsfile 'alright' rm -f httpfile httpsfile msgtest 'download of http file works via' 'https+http' -testsuccess --nomsg downloadfile "http://localhost:${APTHTTPPORT}/working" httpfile +testsuccess --nomsg downloadfile "https+http://localhost:${APTHTTPPORT}/working" httpfile testfileequal httpfile 'alright' - -msgtest 'download of https file works via' 'https+http' -testsuccess --nomsg downloadfile "https://localhost:${APTHTTPSPORT}/working" httpsfile -testfileequal httpsfile 'alright' -rm -f httpfile httpsfile +rm -f httpfile msgtest 'download of a file does not work if' 'https redirected to http' testfailure --nomsg downloadfile "https://localhost:${APTHTTPSPORT}/redirectme/working" redirectfile -- cgit v1.2.3-70-g09d2 From c81b83864b7da79250a210ea7c49b5b03a4b2b16 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 28 Jun 2017 15:29:13 +0200 Subject: Fix test suite and enable non-curl testing on travis, shippable Gbp-Dch: ignore --- .travis.yml | 1 + shippable.yml | 2 +- test/integration/test-apt-update-failure-propagation | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/.travis.yml b/.travis.yml index 74dff44b3..8aa8dceb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ sudo: required dist: trusty env: - TEST_SUITE=user CMAKE_FLAGS= + - TEST_SUITE=user CMAKE_FLAGS="-DWITH_DOC=OFF -DWITH_CURL=OFF" - TEST_SUITE=root CMAKE_FLAGS=-DWITH_DOC=OFF before_install: - sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ wily main universe' -y diff --git a/shippable.yml b/shippable.yml index ad72afc80..e144d94d5 100644 --- a/shippable.yml +++ b/shippable.yml @@ -9,7 +9,7 @@ build: - apt-get install -qq build-essential - ./prepare-release travis-ci - mkdir build - - ( cd build && cmake .. ) + - ( cd build && cmake -DWITH_CURL=OFF .. ) - make -C build -j 4 - CTEST_OUTPUT_ON_FAILURE=1 make -C build test - ./test/integration/run-tests -q diff --git a/test/integration/test-apt-update-failure-propagation b/test/integration/test-apt-update-failure-propagation index 1361b1b93..9ca6e481f 100755 --- a/test/integration/test-apt-update-failure-propagation +++ b/test/integration/test-apt-update-failure-propagation @@ -100,7 +100,13 @@ for FILE in rootdir/etc/apt/sources.list.d/*-stable-* ; do sed -i -e "s#:${APTHTTPSPORT}/#:666/#" "$FILE" done testwarning aptget update -o Dir::Bin::Methods::https="${OLDMETHODS}/https" +if grep -q WITH_CURL:BOOL=OFF $PROJECT_BINARY_DIR/CMakeCache.txt; then +testequalor2 "W: Failed to fetch https://localhost:666/dists/stable/InRelease Failed to connect to localhost port 666: Connection refused +W: Some index files failed to download. They have been ignored, or old ones used instead." "W: Failed to fetch https://localhost:666/dists/stable/InRelease Could not connect to localhost:666 (127.0.0.1). - connect (111: Connection refused) +W: Some index files failed to download. They have been ignored, or old ones used instead." tail -n 2 rootdir/tmp/testwarning.output +else testequalor2 "W: Failed to fetch https://localhost:666/dists/stable/InRelease Failed to connect to localhost port 666: Connection refused W: Some index files failed to download. They have been ignored, or old ones used instead." "W: Failed to fetch https://localhost:666/dists/stable/InRelease couldn't connect to host W: Some index files failed to download. They have been ignored, or old ones used instead." tail -n 2 rootdir/tmp/testwarning.output +fi posttest -- cgit v1.2.3-70-g09d2