Mercurial > kallithea
annotate dev_requirements.txt @ 7277:0cf121eae2fe
tests: fix caching issue in test_ip_restriction_git
Following test failure is observed in
TestVCSOperations.test_ip_restriction_git:
―――――――――――――― TestVCSOperations.test_ip_restriction_git ――――――――――――――――――
kallithea/tests/other/test_vcs_operations.py:584: in test_ip_restriction_git
assert re.search(r'\b403\b', stderr)
E assert None
E + where None = <function search at 0x7fb9772da578>('\\b403\\b', "Cloning into '/tmp/kallithea-test-SZhXDz/vcs_operations-krPNvZ'...\n")
E + where <function search at 0x7fb9772da578> = re.search
------------------------- Captured stdout call ----------------------------
*** CMD git clone http://test_admin:test12@127.0.0.1:45291/vcs_test_git /tmp/kallithea-test-SZhXDz/vcs_operations-krPNvZ ***
stderr: "Cloning into '/tmp/kallithea-test-SZhXDz/vcs_operations-krPNvZ'...\n"
The test is setting up IP restrictions, verifying that access is no longer
possible, then clears the restriction. There already were sleeps after
clearing the restrictions, in order for the cache to expire and have the
setting take effect.
But there was no sleep on the enabling of the IP restriction, allowing
situations where the code would still run without restriction, and thus
allow the access, failing the test.
The failure has only been observed on test_ip_restriction_git, but the
change is also made for test_ip_restriction_hg.
The existing sleeps after restriction clearing are moved up to the 'finally'
clause to make it clear to which code they belong.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Sun, 06 May 2018 21:30:09 +0200 |
parents | 5ab31ff3011f |
children | 9ec1d2ac4529 |
rev | line source |
---|---|
6567
3c469080bb2a
setup: duplicate some requirements from setup.py to dev_requirements.txt so pip --upgrade versions match
Mads Kiilerich <mads@kiilerich.com>
parents:
6484
diff
changeset
|
1 babel >= 0.9.6, < 2.4 |
3c469080bb2a
setup: duplicate some requirements from setup.py to dev_requirements.txt so pip --upgrade versions match
Mads Kiilerich <mads@kiilerich.com>
parents:
6484
diff
changeset
|
2 waitress >= 0.8.8, < 1.0 |
7133
5ab31ff3011f
tests: pytest-catchlog is now integrated in pytest 3.3+
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
6728
diff
changeset
|
3 pytest ~= 3.0, >= 3.3.0 |
6026
dd676fdeda0f
setup: move test dependencies to dev_requirements.txt to make them optional
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
4 pytest-runner |
6148
28b1d67b1601
tests: drop upper bound to pytest-sugar version
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6147
diff
changeset
|
5 pytest-sugar>=0.7.0 |
6728
02c820c5c48e
tests: use pytest-benchmark for performance tests
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6630
diff
changeset
|
6 pytest-benchmark |
6630
d4e1692e25ab
tests: introduce webserver fixture
domruf <dominikruf@gmail.com>
parents:
6569
diff
changeset
|
7 pytest-localserver |
6026
dd676fdeda0f
setup: move test dependencies to dev_requirements.txt to make them optional
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
8 mock |
dd676fdeda0f
setup: move test dependencies to dev_requirements.txt to make them optional
Mads Kiilerich <madski@unity3d.com>
parents:
diff
changeset
|
9 sphinx |
6569
e1ab82613133
backend: replace Pylons with TurboGears2
Alessandro Molina <alessandro.molina@axant.it>
parents:
6567
diff
changeset
|
10 webtest < 3 |