summaryrefslogtreecommitdiff
path: root/test/integration/framework
Commit message (Collapse)AuthorAgeFilesLines
...
* | switch tests to Translation-en usageDavid Kalnischkies2014-10-231-4/+10
| | | | | | | | | | | | | | | | We can use either and some tests exercise this, but the default should be what we want to use and that is a split out long description file which is properly mentioned in the Release file. Git-Dch: Ignore
* | add test for Basic Authentication schemeDavid Kalnischkies2014-10-231-10/+21
| | | | | | | | Git-Dch: Ignore
* | chown finished partial files earlierDavid Kalnischkies2014-10-231-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | test if TMPDIR is accessible before usingDavid Kalnischkies2014-10-201-0/+4
| | | | | | | | | | | | | | | | | | | | Private temporary directories as created by e.g. libpam-tmpdir are nice, but they are also very effective in preventing our priviledge dropping to work as TMPDIR will be set to a directory only root has access to, so working with it as _apt will fail. We circumvent this by extending our check for a usable TMPDIR setting by checking access rights. Closes: 765951
* | testcases: do not allow warnings in testsuccessDavid Kalnischkies2014-10-201-2/+32
| | | | | | | | | | | | | | | | | | | | Adds a new testwarning which tests for zero exit and the presents of a warning in the output, failing if either is not the case or if an error is found, too. This allows us to change testsuccess to accept only totally successful executions (= without warnings) which should help finding regressions. Git-Dch: Ignore
* | check for failure message in testsuccess/failureDavid Kalnischkies2014-10-201-4/+25
| | | | | | | | | | | | | | | | These functions check the exit code of the command, but for apt commands we can go further and require an error message for non-zero exits and none for zero exits. Git-Dch: Ignore
* | check lists/ content in tests doing rollbackDavid Kalnischkies2014-10-201-0/+9
| | | | | | | | Git-Dch: Ignore
* | autorun permission tests for all apt-get update callsDavid Kalnischkies2014-10-201-3/+39
| | | | | | | | | | | | | | | | Adds some infrastructure to run tests automatically for certain commands. The first command being 'apt-get update' (and 'apt update') which check for correct permission and owner of the files in lists/. Git-Dch: Ignore
* | aborted reverify restores file owner and permissionDavid Kalnischkies2014-10-201-22/+32
| | | | | | | | | | | | | | | | | | | | If we get an IMS hit for an InRelease file we use the file we already have and pass it into reverification, but this changes the permissions and on abort of the transaction they weren't switched back. This is now done, additionally, every file in partial which hasn't failed gets permission and owner changed for root access as well, as it is very well possible that the next invocation will (re)use these files.
* | testcases runable as rootDavid Kalnischkies2014-10-151-5/+26
| | | | | | | | | | | | | | Running the testcases is usually not a good idea, but it can be handy to check if the privilege dropping works. Git-Dch: Ignore
* | Add new configallowinsecurerepositories to the test frameworkMichael Vogt2014-10-141-0/+9
| | | | | | | | | | | | | | 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.
* | fix compile and tests errorDavid Kalnischkies2014-10-131-1/+1
| | | | | | | | | | | | I am pretty sure I did that before committing broken stuff… Git-Dch: Ignore
* | trusted=yes sources are secure, we just don't know whyDavid Kalnischkies2014-10-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not require a special flag to be present to update trusted=yes sources as this flag in the sources.list is obviously special enough. Note that this is just disabling the error message, the user will still be warned about all the (possible) failures the repository generated, it is just triggering the acceptance of the warnings on a source-by-source level. Similarily, the trusted=no flag doesn't require the user to pass additional flags to update, if the repository looks fine in the view of apt it will update just fine. The unauthenticated warnings will "just" be presented then the data is used. In case you wonder: Both was the behavior in previous versions, too.
* | do not show IP in output of testcasesDavid Kalnischkies2014-10-071-0/+3
| | | | | | | | | | | | | | | | | | On travis-ci connect.cc detects a rotation, triggering it store the IP which is later appended to the error message, which is all nice and great if we deal with a real server, but in the testcases it just triggers failures as strings do not match. Git-Dch: Ignore
* | don't show ErrorText for Ign by defaultDavid Kalnischkies2014-10-071-1/+5
| | | | | | | | | | | | | | | | Some distributions (or repositories) do not have as much "Ign-discipline" as I would like to, so that could be pretty distracting for our users if enabled by default. It is handy for testcases though. Git-Dch: Ignore
* | Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt2014-10-071-0/+3
|\ \ | | | | | | | | | | | | | | | | | | feature/acq-trans Conflicts: apt-pkg/acquire-item.cc
* | | display errortext for all Err as well as Ign logsDavid Kalnischkies2014-10-071-4/+9
| | | | | | | | | | | | | | | | | | | | | consistently using Item::Failed in all specializec classes helps setting up some information bits otherwise unset, so some errors had an empty reason as an error. Ign is upgraded to display the error message we ignored to further help in understanding what happens.
* | | use _apt:root only for partial directoriesDavid Kalnischkies2014-10-071-5/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a different user for calling methods is intended to protect us from methods running amok (via remotely exploited bugs) by limiting what can be done by them. By using root:root for the final directories and just have the files in partial writeable by the methods we enhance this in sofar as a method can't modify already verified data in its parent directory anymore. As a side effect, this also clears most of the problems you could have if the final directories are shared without user-sharing or if these directories disappear as they are now again root owned and only the partial directories contain _apt owned files (usually none if apt isn't running) and the directory itself is autocreated with the right permissions.
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-291-0/+30
|\| | | | | | | | | Conflicts: apt-pkg/acquire-item.cc
| * rewrite compressed indexes test to check with all compressorsDavid Kalnischkies2014-09-251-0/+30
| | | | | | | | Git-Dch: Ignore
* | add --readonly option for apt-key advDavid Kalnischkies2014-09-271-2/+2
| | | | | | | | | | | | | | | | Some advanced commands can be executed without the keyring being modified like --verify, so this adds an option to disable the mergeback and uses it for our gpg calling code. Git-Dch: Ignore
* | add --secret-keyring option for apt-keyDavid Kalnischkies2014-09-271-3/+3
| | | | | | | | | | | | | | | | | | For some advanced usecases it might be handy to specify the secret keyring to be used (e.g. as it is used in the testcases), but specifying it via a normal option for gnupg might not be available forever: http://lists.gnupg.org/pipermail/gnupg-users/2013-August/047180.html Git-Dch: Ignore
* | use apt-key to wrap gpg calls in testcasesDavid Kalnischkies2014-09-271-31/+9
| | | | | | | | | | | | | | beside testing apt-key a bit it also avoids duplicating gpghome setup code in apt-key and the test framework Git-Dch: Ignore
* | use apt-key adv (+ gnupg) instead of gpgv for verifyDavid Kalnischkies2014-09-271-0/+1
| | | | | | | | | | | | | | | | apt-key does the keyring merge as we need it, so we just call it instead of reimplementing it to do the merging before gpgv. This means we don't use gpgv anymore (we never depended on it explicitly - bad style), but it also means that the message in apt-cdrom add is a bit less friendly as it says loudly "untrusted key", but for a one-time command its okay.
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-231-2/+8
|\| | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/cachefilter.h configure.ac debian/changelog
| * detect terminal output with 'test -t' in testsDavid Kalnischkies2014-09-071-1/+1
| | | | | | | | | | | | | | | | Instead of trying to inspect /proc and the fds inside we use "test -t 1" instead as this is available and working on kfreebsd as well – not that something breaks if we wouldn't, but we like color. Git-Dch: Ignore
| * support regular expressions in 'apt search'David Kalnischkies2014-09-071-1/+7
| | | | | | | | | | apt-cache search supported this since ever and in the code for apt was a fixme indicating this should be added here as well, so here we go.
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-07-081-29/+29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/deb/deblistparser.cc doc/po/apt-doc.pot doc/po/de.po doc/po/es.po doc/po/fr.po doc/po/it.po doc/po/ja.po doc/po/pl.po doc/po/pt.po doc/po/pt_BR.po po/da.po po/mr.po po/vi.po
| * use printf instead of echo in testing frameworkMichele Orrù2014-07-071-29/+29
| | | | | | | | | | | | | | | | | | The behaviour of echo "\tA\t" differs between dash/zsh which interprets the \t as tab and bash which prints it literally. Similar things happen for other escape sequences – without the -e flag. Switching to printf makes this more painless^Wportable, so that the tests are also working correctly with bash as sh. (commit message by committer, patch otherwise unmodified)
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-06-181-0/+8
|\| | | | | | | | | Conflicts: debian/changelog
| * fix test-apt-ftparchive-cachedb-lp1274466 and apt-internal-solver testsMichael Vogt2014-06-111-2/+2
| |
| * fix autopkgtest testsMichael Vogt2014-06-111-0/+2
| |
| * support parsing EDSP requests Architecture{,s} stanzaDavid Kalnischkies2014-05-301-0/+6
| | | | | | | | | | | | Adds also a small testcase for EDSP Git-Dch: Ignore
| * (try to) fix travis-ci build failuresDavid Kalnischkies2014-05-291-1/+2
| | | | | | | | | | | | | | | | | | | | dpkg on Ubuntu 12.04 does not seem to support parsing arch-specific dependencies, so we try to detect if we face such a dpkg in the test. In the other test the order depends on libdb, which changes per arch, so we just run it through our sorting binary and be happy (hopefully). Git-Dch: Ignore
* | (try to) fix travis-ci build failuresDavid Kalnischkies2014-05-121-1/+2
| | | | | | | | | | | | | | | | | | | | dpkg on Ubuntu 12.04 does not seem to support parsing arch-specific dependencies, so we try to detect if we face such a dpkg in the test. In the other test the order depends on libdb, which changes per arch, so we just run it through our sorting binary and be happy (hopefully). Git-Dch: Ignore
* | deal with hashes in ftparchive more dynamic as wellDavid Kalnischkies2014-05-091-6/+4
| | | | | | | | | | | | | | | | | | | | | | Now that libapts acquire system happily passes around hashes and can be made to support new ones without an ABI break in the future, we can free ftparchive from all the deprecation warnings the last commit introduced for it. The goal here isn't to preserve ABI as we have none to keep here, but to help avoiding introduction problems of 'new' hashes later as bugs creep into the copy&paste parts, so short/less of them is good.
* | tests: be able to disable "Fetched …" statistics messageDavid Kalnischkies2014-05-091-0/+1
| | | | | | | | | | | | | | | | The line contains everchanging execution statistics which is harmful for testcases as they need to filter out such lines, but this is hard so we can just add an option to disable them instead and be done. Git-Dch: Ignore
* | Merge remote-tracking branch 'mvo/bugfix/update-progress-reporting' into ↵Michael Vogt2014-05-081-1/+4
|\| | | | | | | debian/experimental
| * Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into ↵Michael Vogt2014-05-071-1/+4
| |\ | | | | | | | | | debian/sid
| | * Implement CacheDB for source packages in apt-ftparchiveMichael Vogt2014-04-041-1/+4
| | |
* | | add BUILDDIRECTORY to PATH in the testsMichael Vogt2014-05-071-1/+2
|/ /
* | fix test-failure in adtMichael Vogt2014-04-101-1/+7
| |
* | Fix possible race when stunnel/aptwebserver create their PID filesMichael Vogt2014-04-091-0/+19
|/ | | | | | This patch should fix spurious test failures in jenkins or travis that are caused by a race condition in the {stunnel,aptwebserver}.pid file creation
* Use mkstemp() in apt-extracttemplaes (closes: #741627)Michael Vogt2014-03-271-0/+1
| | | | | Use mkstemp() in apt-extractemplates and add a integrationtest for apt-extracttemplates too. Thanks to Steve Kemp for the report.
* fix test/integration/test-apt-helperMichael Vogt2014-03-141-57/+97
|\
| * factor out getting list of architectures from comma listDavid Kalnischkies2014-03-131-5/+8
| | | | | | | | | | | | | | Beside fixing this minor code duplication it also resolves the problem of messing up vim syntax-highlighting. Git-Dch: Ignore
| * correct LD_LIBRARY_PATH and config loading for apt-helperDavid Kalnischkies2014-03-131-25/+15
| | | | | | | | | | | | | | Mostly ensures that we use the build methods and not the system provided methods in the tests (if we don't want it that way). Git-Dch: Ignore
| * support kfreebsd and hurd in the kernel hookDavid Kalnischkies2014-03-131-1/+1
| | | | | | | | | | | | kfreebsd as well as hurd kernel packages call the postinst script as well so we just need to enable the correct parsing for installed packages and disable the "protect every version" hammer for them.
| * use a configurable list of versioned kernel packagesDavid Kalnischkies2014-03-131-4/+6
| | | | | | | | | | | | With APT::VersionedKernelPackages users have the option of adding packages like pre-build out-of-tree modules to the list of automatically protected from being autoremoved.
| * improve debug output in case downloadfile failsDavid Kalnischkies2014-03-131-31/+52
| | | | | | | | Git-Dch: Ignore