summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-helper
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-11-09 21:38:53 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-11-18 02:41:20 +0100
commit081c9d442a6d39fb9bc419fe3ce697cc791cb844 (patch)
tree52505e06aa24b79cbec7215dd1c0ef5305050eff /test/integration/test-apt-helper
parent546dbfc82ad9ff0308b365bca3731a1118b1d251 (diff)
various small additional tests and testcases
Usually they don't provide a lot in terms of what they test, but they help in covering many lines from strictly anecdotal commands (stats, moo) and error messages, so that stuff which really needs to be tested, but isn't is better visible in coverage reports. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-apt-helper')
-rwxr-xr-xtest/integration/test-apt-helper12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/integration/test-apt-helper b/test/integration/test-apt-helper
index 06e497ff7..3c1d393a6 100755
--- a/test/integration/test-apt-helper
+++ b/test/integration/test-apt-helper
@@ -53,7 +53,7 @@ echo "http://some-proxy"
EOF
chmod 755 apt-proxy-detect
echo "Acquire::http::Proxy-Auto-Detect \"$(pwd)/apt-proxy-detect\";" > rootdir/etc/apt/apt.conf.d/02proxy-detect
-
+
testequal "Using proxy 'http://some-proxy' for URL 'http://www.example.com/'" apthelper auto-detect-proxy http://www.example.com
@@ -64,13 +64,15 @@ echo "https://https-proxy"
EOF
chmod 755 apt-proxy-detect
echo "Acquire::https::Proxy-Auto-Detect \"$(pwd)/apt-proxy-detect\";" > rootdir/etc/apt/apt.conf.d/02proxy-detect
-
- testequal "Using proxy 'https://https-proxy' for URL 'https://ssl.example.com/'" apthelper auto-detect-proxy https://ssl.example.com
-
-
+ testequal "Using proxy 'https://https-proxy' for URL 'https://ssl.example.com/'" apthelper auto-detect-proxy https://ssl.example.com
}
test_apt_helper_download
test_apt_helper_detect_proxy
+# test failure modes
+testequal 'E: Invalid operation download' apthelper download
+testequal 'E: Must specify at least one pair url/filename' apthelper download-file
+testequal 'E: Must specify at least one pair url/filename' apthelper download-file http://example.org/
+testequal 'E: Need one URL as argument' apthelper auto-detect-proxy