mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
housekeep: TU rename - Test suite
Rename tests: Function names, variables, etc. Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
parent
49b7fa37f3
commit
f922f64853
15 changed files with 332 additions and 332 deletions
|
@ -116,10 +116,10 @@ def test_get_count(stats: Statistics, test_data, counter: str, expected: int):
|
|||
|
||||
def test_get_count_change(stats: Statistics, test_data):
|
||||
pkgs_before = stats.get_count("package_count")
|
||||
tus_before = stats.get_count("package_maintainer_count")
|
||||
pms_before = stats.get_count("package_maintainer_count")
|
||||
|
||||
assert pkgs_before == 10
|
||||
assert tus_before == 1
|
||||
assert pms_before == 1
|
||||
|
||||
# Let's delete a package and promote a user to TU
|
||||
with db.begin():
|
||||
|
@ -131,12 +131,12 @@ def test_get_count_change(stats: Statistics, test_data):
|
|||
|
||||
# Values should end up in (fake) redis cache so they should be the same
|
||||
assert stats.get_count("package_count") == pkgs_before
|
||||
assert stats.get_count("package_maintainer_count") == tus_before
|
||||
assert stats.get_count("package_maintainer_count") == pms_before
|
||||
|
||||
# Let's clear the cache and check again
|
||||
cache._redis.flushall()
|
||||
assert stats.get_count("package_count") != pkgs_before
|
||||
assert stats.get_count("package_maintainer_count") != tus_before
|
||||
assert stats.get_count("package_maintainer_count") != pms_before
|
||||
|
||||
|
||||
def test_update_prometheus_metrics(test_data):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue