summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2018-01-21Move AUR_OVERWRITE privilege check from git/auth to git/updateJohannes Löthberg2-18/+13
git/auth is run as an AutherizedKeysCommand which does not get the environment variables passed to it, so AUR_OVERWRITE always got hard-set to '0' by it. Instead we need to perform the actual privilege check in git/update instead. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-08-25Fix use of test_must_fail with environment variablesLukas Fleischer2-68/+111
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-08-10t1100: Test AUR_OVERWRITELukas Fleischer1-0/+17
Since c5302d3 (Require TUs to explicitly request to overwrite a pkgbase, 2017-07-24), non-fast-forward pushes require setting the AUR_OVERWRITE environment variable. Make sure that git-auth passes this variable to git-serve when it should (and does not pass it if it shouldn't). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-08-08t1300: Fix test cases for non-fast-forward pushesLukas Fleischer1-0/+11
Since commit c5302d3 (Require TUs to explicitly request to overwrite a pkgbase, 2017-07-24), non-fast-forward pushes are denied even for Trusted Users, unless the AUR_OVERWRITE environment variable is set. Mark the test case performing a non-fast-forward push from a TU account as test_must_fail and add another test case performing the same operation with AUR_OVERWRITE=1. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-08-01mkpkglists: Generate a list of user namesLukas Fleischer2-0/+19
In addition to the packages list and the package base list, also create a list of registered user names. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-25Initialize PackageRequests.{Comments,ClosureComment}Lukas Fleischer1-3/+3
Since commit 09cb61a (schema: Remove invalid default values for TEXT columns, 2017-04-15), the PackageRequests.Comments and PackageRequests.ClosureComment fields no longer have a default value. Initialize these fields explicitly whenever a new row is added to the PackageRequests table. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-25Explicitly initialize PackageBases.FlaggerCommentLukas Fleischer4-19/+19
Since commit 09cb61a (schema: Remove invalid default values for TEXT columns, 2017-04-15), the PackageBases.FlaggerComment field no longer has a default value. Initialize this field explicitly whenever a new row is added to the PackageBases table. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-25t1300: Factor out package dumpingLukas Fleischer1-24/+12
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-24Do not keep line breaks in commentsLukas Fleischer1-1/+1
With the new Markdown support, text paragraphs are now properly converted to HTML paragraphs, so we no longer need to keep line breaks. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-24t2600: Test Markdown and HTML sanitizingLukas Fleischer1-0/+42
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-24Make references to Git commits clickableLukas Fleischer2-0/+2
Automatically detect Git commit identifiers, shorten them, and make them link to the cgit interface. Implements FS#43290. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-23Add Markdown support to package commentsLukas Fleischer1-1/+2
Support Markdown syntax in package comments. Among other things, this makes it easier to paste command line output and patches. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-23Render comments when storing them in the databaseLukas Fleischer2-0/+23
Instead of converting package comments from plain text to HTML code when they are displayed, do the conversion when the comment is posted and store the rendered result in the database. The conversion itself is done by a Python script which uses Bleach for sanitizing the text. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-03-03test/setup.sh: Error out on missing SQLite schemaLukas Fleischer1-1/+3
Instead of making all tests fail, error out during initialization if the SQLite schema has not been generated. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-03-01Add a Makefile to build an SQLite-compatible schemaLukas Fleischer2-10/+7
Allow for automatically converting the schema into a schema that works with SQLite by running `make` from the schema/ subdirectory. Use the new Makefile in the test suite. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-25t1200: Test IP address log and bansLukas Fleischer2-0/+29
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-23t1200: Add tests for vote/unvoteLukas Fleischer1-0/+66
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-12-20t1200: Add tests for flag/unflagLukas Fleischer1-0/+63
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-12-20t1200: Test maintenance modeLukas Fleischer1-0/+11
Add a test case to ensure that enabling the maintenance mode disables the SSH interface. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-11-13Add tests for out-of-date notificationsLukas Fleischer1-0/+33
Make sure that out-of-date notifications are sent to package base maintainers as well as co-maintainers. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-11-13test/setup.sh: Fix script pathsLukas Fleischer1-5/+5
The scripts were moved to aurweb/scripts/ in commit 3718860 (Make maintenance scripts installable, 2016-10-17). Update the paths in the test suite accordingly. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-11git-serve: Close orphan requests upon disownLukas Fleischer1-0/+23
When disowning a package base via the SSH interface, auto-accept all pending orphan requests for the affected package. Also, add a test case that checks whether (only) orphan requests belonging to disowned packages are closed correctly. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-11git-update: Catch long source URLsLukas Fleischer1-0/+16
Bail out early if the source array contains an entry with more than 8000 characters. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-11Make URL columns 8000 characters wideLukas Fleischer1-0/+16
According to RFC 7230, URLs can be up too 8000 characters long. Resize all URL fields accordingly. Also, add a test to verify that URLs with more than 8000 characters are rejected by the update hook. Reported-by: Andreas Linz <klingt.net@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-08Reorganize Git interface scriptsLukas Fleischer1-4/+4
Move the Git interface scripts from git-interface/ to aurweb/git/. Use setuptools to automatically create wrappers which can be installed using `python3 setup.py install`. Update the configuration files, the test suite as well as the INSTALL and README files to reflect these changes. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29t2200: Check that only non-voters get remindersLukas Fleischer2-0/+31
Add a test to make sure that Trusted Users, who already voted on a proposal, do not receive any reminders. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Use the notify script in testsLukas Fleischer2-10/+15
Instead of only checking whether the notification script is called with the correct parameters, actually invoke the real notify script and check whether proper notifications are generated. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add tests for aurblupLukas Fleischer2-0/+59
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add tests for pkgmaintLukas Fleischer2-0/+27
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add tests for tuvotereminderLukas Fleischer2-1/+29
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Add tests for mkpkglistsLukas Fleischer2-0/+52
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-09-29Reorganize testsLukas Fleischer6-0/+1837
Move and rename the existing git-interface tests such that tests for other scripts can be added easily. In particular, the following changes are made: * Move the existing tests from git-interface/test/ to test/. * Rename t0001-auth.sh to t1100-git-auth.sh. * Rename t0002-serve.sh to t1200-git-serve.sh. * Rename t0003-update.sh to t1300-git-update.sh. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>