summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-helper
Commit message (Collapse)AuthorAgeFilesLines
* add apt-helper drop-privs command…David Kalnischkies2018-02-191-0/+7
|
* Show permission error if ProxyAutoDetect cmd can't be executedDavid Kalnischkies2017-06-261-0/+2
| | | | | | | | | | As the proxy commands are not executed as root, a user can run into permission errors (s)he isn't expecting – as our switching is an implementation detail – so the error message in that case should really be better than a generic "error code 100" sending the user in the wrong direction as that implies the command was executed, but errored out. Closes: 857885
* Add a few more Auto-Detect-Proxy testsDavid Kalnischkies2017-06-261-5/+10
| | | | Gbp-Dch: Ignore
* rename Checksum-FileSize to Filesize in hashsum mismatchDavid Kalnischkies2016-11-091-2/+2
| | | | | | | | Some people do not recognize the field value with such an arcane name and/or expect it to refer to something different (e.g. #839257). We can't just rename it internally as its an avoidance strategy as such fieldname existed previously with less clear semantics, but we can spare the general public from this implementation detail.
* add [weak] tag to hash errors to indicate insufficiencyDavid Kalnischkies2016-06-221-5/+5
| | | | | | | For "Hash Sum mismatch" that info doesn't make a whole lot of difference, but for the new insufficient info message an indicator that while this hashes are there and even match, they aren't enough from a security standpoint.
* implement and document DIRECT for auto-detect-proxyDavid Kalnischkies2016-06-201-28/+27
| | | | | | | There is a subtile difference between an empty setting and "DIRECT" in the configuration as the later overrides the generic settings while the earlier does not. Also, non-zero exitcodes should really be reported as an error rather than silently discarded.
* do not error if auto-detect-proxy cmd has no outputDavid Kalnischkies2016-06-201-1/+7
| | | | | | | | | | | Regression introduced in 8f858d560e3b7b475c623c4e242d1edce246025a. Commands are probably better of always having output through as the fall through to the generic proxy settings is likely not intended. As documenting and implementing this more consistently is kind of a regression through, it is split off into the next commit. Closes: 827713
* show more details for "Hash Sum mismatch" errorsDavid Kalnischkies2016-04-251-0/+15
| | | | | | | | | | | | | | | | Users tend to report these errors with just this error message… not very actionable and hard to figure out if this is a temporary or 'permanent' mirror-sync issue or even the occasional apt bug. Showing the involved hashsums and modification times should help in triaging these kind of bugs – and eventually we will have less of them via by-hash. The subheaders aren't marked for translation for now as they are technical glibberish and probably easier to deal with if not translated. After all, our iconic "Hash Sum mismatch" is translated at least. These additions were proposed in #817240 by Peter Palfrader.
* drop empty line from fetch errorDavid Kalnischkies2016-04-251-2/+0
| | | | | | | | This is a duplicate of sorts of 0efb29eb36184bbe6de7b1013d1898796d94b171 which is the a lot more frequent case of this error – and also a duplicate of this error message, just without the \n at the end. Git-Dch: Ignore
* tests: support spaces in path and TMPDIRDavid Kalnischkies2015-12-191-2/+2
| | | | | | | This doesn't allow all tests to run cleanly, but it at least allows to write tests which could run successfully in such environments. Git-Dch: Ignore
* tests: use quiet level 0 by default in testsDavid Kalnischkies2015-11-191-3/+3
| | | | Git-Dch: Ignore
* tests: don't use hardcoded port for http and httpsDavid Kalnischkies2015-09-151-23/+29
| | | | | | This allows running tests in parallel. Git-Dch: Ignore
* various changes to increase test-coverageDavid Kalnischkies2015-09-141-0/+3
| | | | | | | And of course, testing obscure things ends up showing obscure 'bugs' or better shortcomings/inconsitencies, so lets fix them with the tests. Git-Dch: Ignore
* use unusable-for-security hashes for integrity checksDavid Kalnischkies2015-09-011-9/+25
| | | | | | | We want to declare some hashes as not enough for security, so that a user will need --allow-unauthenticated or similar to get data secured only by those hashes, but we can still us these hashes for integrity checks if we got them.
* Consider md5sum no longer a usable hashMichael Vogt2015-09-011-7/+3
| | | | | The md5sum hash is broken since some time and we should no longer consider it a usable hash. Also update the tests to reflect this.
* fix download-file using testcases to run as rootDavid Kalnischkies2015-06-091-13/+13
| | | | Git-Dch: Ignore
* test exitcode as well as string equalityDavid Kalnischkies2015-03-161-7/+7
| | | | | | | | We use test{success,failure} now all over the place in the framework, so its only consequencial to do this in the situations in which we test for a specific output as well. Git-Dch: Ignore
* merge debian/sid into debian/experimentalDavid Kalnischkies2015-03-161-21/+22
|\
| * dispose http(s) 416 error page as non-contentDavid Kalnischkies2014-12-221-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Real webservers (like apache) actually send an error page with a 416 response, but our client didn't expect it leaving the page on the socket to be parsed as response for the next request (http) or as file content (https), which isn't what we want at all… Symptom is a "Bad header line" as html usually doesn't parse that well to an http-header. This manifests itself e.g. if we have a complete file (or larger) in partial/ which isn't discarded by If-Range as the server doesn't support it (or it is just newer, think: mirror rotation). It is a sort-of regression of 78c72d0ce22e00b194251445aae306df357d5c1a, which removed the filesize - 1 trick, but this had its own problems… To properly test this our webserver gains the ability to reply with transfer-encoding: chunked as most real webservers will use it to send the dynamically generated error pages. (The tests and their binary helpers had to be slightly modified to apply, but the patch to fix the issue itself is unchanged.) Closes: 768797
* | various small additional tests and testcasesDavid Kalnischkies2014-11-181-5/+7
| | | | | | | | | | | | | | | | | | 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
* | chown finished partial files earlierDavid Kalnischkies2014-10-231-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partial files are chowned by the Item baseclass to let the methods work with them. Now, this baseclass is also responsible for chowning the files back to root instead of having various deeper levels do this. The consequence is that all overloaded Failed() methods now call the Item::Failed base as their first step. The same is done for Done(). The effect is that even in partial files usually don't belong to _apt anymore, helping sneakernets and reducing possibilities of a bad method modifying files not belonging to them. The change is supported by the framework not only supporting being run as root, but with proper permission management, too, so that privilege dropping can be tested with them.
* | allow fetcher setup without directory creationDavid Kalnischkies2014-09-271-7/+7
|/ | | | | | | | | | | apt-get download and changelog as well as apt-helper reuse the acquire system for their own proposes without requiring the directories the fetcher wants to create, which is a problem if you run them as non-root and the directories do not exist as it greets you with: E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (13: Permission denied) Closes: 762898
* Make Proxy-Auto-Detect check for each hostMichael Vogt2014-09-021-22/+58
| | | | | | | | | When doing Acquire::http{,s}::Proxy-Auto-Detect, run the auto-detect command for each host instead of only once. This should make using "proxy" from libproxy-tools feasible which can then be used for PAC style or other proxy configurations. Closes: #759264
* fix test/integration/test-apt-helperMichael Vogt2014-03-141-2/+4
|
* add hashsum support in apt-file download and add more testsMichael Vogt2014-03-121-0/+37