Commit Graph

2374 Commits

Author SHA1 Message Date
Jelle van der Waa
fe14c23a88 mirrors: Add tests for mirror detail urls
Add tests for mirror detail pages, the json url of the mirror detail
page and the mirror's url detail page.
2018-03-26 21:20:25 +02:00
Jelle van der Waa
8ce83c115c mirrors: remove duplicate test 2018-03-26 21:20:25 +02:00
Jelle van der Waa
538fc2b626 mirrors: Test mirror status with tier specified 2018-03-26 21:20:22 +02:00
Jelle van der Waa
692d80d71e todolists: Add test for overview and detail page 2018-03-25 19:18:46 +02:00
Jelle van der Waa
d8977b24f5 todolists: Add test for templatetags
Test a simple case of the todolist_details_link template tag
2018-03-25 17:34:44 +02:00
Jelle van der Waa
ce0f2214a8 todolists: Add missing __init__.py in tests
Without it, the tests won't be picked up.
2018-03-25 17:31:58 +02:00
Jelle van der Waa
bbd06a3559 main: Add more tests for donor_import
Throw a CommandError when the path is not found, similar to what
reporead does and add a test for decode_subject.
2018-03-25 17:04:55 +02:00
Jelle van der Waa
876b9b0b19 tests: Extend test coverage for pgp_key_link
Add tests for providing an int/long to pgp_key_link with various sizes:
8, 16 or 40 chars.
2018-03-25 16:33:54 +02:00
Jelle van der Waa
bdc563d8a6 tests: Fix 8,20 key_id length test 2018-03-24 22:13:41 +01:00
jelle van der Waa
843c9a4397 Bump requirements (#90)
* Bump psycopg2 for postgresql 10

Update the psycopg2 version to the latest release for postgresql 10
compatibility.

* Bump memcached to the latest stable version
2018-03-23 19:15:12 -04:00
jelle van der Waa
a9eae9ad70 FS#50516: mirrors: Extend /mirrors/status/json/ (#91)
Add the ipv4/ipv6 availability to the /mirrors/status/json api.
2018-03-23 19:15:01 -04:00
jelle van der Waa
165cb10fac FS#51458: Add HELLOTUX to the support section (#89)
Include a link to the HELLOTUX t-shirt store, which donates $2 per
bought t-shirt to Arch Linux.
2018-03-23 12:17:22 -04:00
jelle van der Waa
c5227a5b26
Merge pull request #87 from archlinux/felixonmars-patch-1
Fix a typo in packages/search.html template
2018-03-14 09:02:57 +01:00
Felix Yan
d6bee205bd
Fix a typo in packages/search.html template 2018-03-14 07:28:00 +08:00
jelle van der Waa
6a841d455b
Merge pull request #86 from jelly/fix_release_details_list
Fix release details list
2018-03-13 21:12:20 +01:00
Jelle van der Waa
74ec6c9d61 Re-add missing release details view
In 875d50d8f the Iso Model was removed and also the release_detail view
which should have stayed since it's still used.
2018-03-13 20:59:53 +01:00
Jelle van der Waa
17bdd0d155 Revert "Remove link to a deprecated view"
This reverts commit 5578d3ac6d.
2018-03-13 20:37:12 +01:00
Angel Velasquez
5578d3ac6d Remove link to a deprecated view
Release details links was removed so it was giving a 500 because the
template does not exist anymore, removing the link
2018-03-12 21:23:30 -04:00
jelle van der Waa
7a317b73ba
Merge pull request #85 from kyrias/json-mirror-url-active
mirrors/views/api: Add URL active status
2018-02-18 22:06:11 +01:00
Johannes Löthberg
8577d59577 mirrors/views/api: Add URL active status
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-02-18 18:16:41 +01:00
jelle van der Waa
f3e26eb15a Misc fixes (#84)
* Update coveragerc to exclude newly located tests

There are now tests under main/tests/* etc, which should be omitted for
coverage.

* omit settings from coverage

settings and local_settings aren't interesting for coverage, omit them.

* remove leftover secure context processor

The secure context processor was used to determine if the cdn served
assets should be loaded over https or http. Since assets are no longer
served with a cdn and the whole site is loaded over https these days,
this code is dead and can be removed.

* packages: Add test for flagging packages out of date

Add simple test cases for flagging packages out of date, should later be
improved to query the Package model for packages and use that data
instead of hardcoding.
2018-02-18 04:33:52 -05:00
jelle van der Waa
875d50d8f2 Remove unused Iso Model (#82)
The ISO model was used for the releng feedback form which was removed
earlier. All this code is therefore now unused.
2018-02-17 12:55:13 -05:00
jelle van der Waa
15e4f75321 releng: Add tests for a few views (#83)
Add a few simple tests for some of the releases views.
2018-02-17 12:54:09 -05:00
jelle van der Waa
73107e0a6a Add donation import management script (#81)
This script imports messages from a Maildir folder and creates new
unique Donors based on the name in the subject. The subject also
contains the amount and the email address, which is not stored by
Archweb.
2018-02-17 12:53:20 -05:00
jelle van der Waa
148692cd8f More code refactoring / tests (#79)
* main: move tests to main/tests

Move the templatetags tests to main/tests/test_templatetags.

* main: Add test for templatetags country

Create a test for the templatetag country_flag.

* main: remove duplicate floatvalue

floatvalue is only used in the mirrors templates and the same exact
function exists in the mirror_status templatetags.

* main: Remove duplicate hours filter

The hours filter is also defined in the mirror_status and only used in
mirrors.

* main: move percentage filter to mirrors

Move the percentage filter to the only user of it and add a test for
basic use cases.

* main: remove duplicate duration implementation

The duration templatetag filter is also defined in mirror_status.py

* templates: remove unrequired import flags

* main: Add missing testcase for country_flag

Add the None test case, so that the function is fully covered.

* todolists: create tests for Todolist model

Add basic tests for the Todolist model
2018-01-29 14:10:10 -05:00
jelle van der Waa
2ff2b26aa9 Remove old releng feedback form (#80)
Remove the old feedback functionality for released iso's. The last
submission was in 2012 and it's no longer used by the current released
iso's.
2018-01-29 14:09:55 -05:00
jelle van der Waa
f42f357fdf Mirror tests (#78)
* mirrors: Move tests to mirrors/tests

Move the tests to separate files in mirrors/tests and expand the model
tests with tests for the Mirror class.

* Add CheckLocation test

* mirrors: Add tests for template filters

Include tests for the filters used in the mirrors views.

* devel: Add tests for template filter in_group

Include a test for a simple case of the in_group filter.
2018-01-22 12:41:39 -05:00
jelle van der Waa
c79dc7dcf4 Remove Konami code functionality (#77)
Remove the easteregg on the home page which shows a tux when a user
enters the Konami code. Which reduces maintenance of a non-critical
component.
2018-01-22 12:41:25 -05:00
jelle van der Waa
1e65142aea Add more basic url tests (#76)
* packages: Add test for differences view

Add a simple test to check if the differences view renders.

* packages: Add tests for more urls

Add basic tests for /packages/ related urls.

* mirrors: Add mirrorlist urls
2018-01-04 16:23:06 -05:00
jelle van der Waa
e4ab95c56a Add opensearch tests (#75) 2018-01-04 16:02:27 -05:00
Johannes Löthberg
b133869cc9 mirrors/views/api: Fix mirrors.change_mirror perm typo (#74)
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-01-02 21:29:53 -05:00
Johannes Löthberg
5538aa8799 Add pagination to JSON package search (#73)
* Add pagination to JSON search form using Paginator

The downside of this is that we can't easily run prefetch_related
anymore, but given the limit I don't suspect this to be a problem.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* packages/views/search: Add appropriate newlines to search_json

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* Update package fixture to be the same as devel/fixtures/core.db.tar.gz

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* packages/tests: Add tests for JSON search pagination

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-01-02 13:08:10 -05:00
Johannes Löthberg
860a0511a0 Add mirror detail URLs to JSON output (#71)
* Add mirror detail URLs to JSON output

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>

* Bump mirror details JSON version to 4

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-12-29 22:26:23 -05:00
Johannes Löthberg
176456e485 packages/test: Fix shadowed test name (#72)
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-12-29 22:24:50 -05:00
jelle van der Waa
f69e76d247
Merge pull request #70 from kyrias/mirror-status-json-email
Add admin emails to the mirror status JSON output when logged in
2017-12-28 21:44:01 +01:00
Johannes Löthberg
e94ac60ec2 Require mirror.change_mirror perm to see emails
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-12-28 19:16:12 +01:00
Johannes Löthberg
ec3a4cf0a0 Add admin emails to the mirror status JSON output when logged in
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-12-28 12:25:33 +01:00
Johannes Löthberg
a4cc538c3b Return different dep types under different keys in JSON results
* Return different dep types under different keys in JSON results
* packages/utils: Put dependency type list above class

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-11-28 15:06:47 -05:00
Angel Velásquez
6363af204c
Merge pull request #68 from jelly/test_search
packages: Add tests for json and normal package search
2017-11-26 19:17:42 -05:00
Jelle van der Waa
534e5dfa06 packages: Add tests for json and normal package search
Test all known scenario's and easy to test search scenario's.
2017-11-26 17:51:52 +01:00
Angel Velásquez
d753449a39
Merge pull request #63 from eli-schwartz/master
package details: remove category from bugtracker links
2017-11-16 14:33:10 -03:00
Angel Velásquez
cd1bc1c637
Merge pull request #65 from jelly/update_differences
Update differences
2017-11-16 14:32:47 -03:00
Angel Velásquez
07c9791e4e
Merge pull request #66 from jelly/i686_test_fix
Update test to x86_64
2017-11-16 14:32:05 -03:00
Angel Velásquez
29a83c57a1
Merge pull request #64 from jelly/drop_i686
Drop i686
2017-11-15 18:32:18 -03:00
Jelle van der Waa
8c95a58e61 feeds: remove mention of i686
Replace dropped i686 with x86_64
2017-11-15 20:22:31 +01:00
Jelle van der Waa
e46e289964 Update test to x86_64 2017-11-15 20:11:07 +01:00
Jelle van der Waa
373a426cb1 Update differences view for dropping i686
Remove the i686 and x86_64 comparison since i686 is dropped and change
the multilib difference to compare against x86_64 instead of i686.
2017-11-15 20:01:29 +01:00
Jelle van der Waa
0b02234f56 Update test to x86_64 2017-11-15 19:26:51 +01:00
Jelle van der Waa
db69f92e74 templates: index.html remove i686 2017-11-07 22:32:59 +01:00
Jelle van der Waa
1ffef46890 templates: about.html remove i686 2017-11-07 20:47:10 +01:00