Mercurial > kallithea
annotate setup.cfg @ 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 | d88077fae3d6 |
children | 0a2d85671b59 |
rev | line source |
---|---|
0 | 1 [egg_info] |
5379
1949ece749ce
cleanup: fix whitespace in CONTRIBUTORS (and other forgotten files) too
Mads Kiilerich <madski@unity3d.com>
parents:
5146
diff
changeset
|
2 tag_build = |
4988
acaa02179aeb
setup.cfg: update checked-in version to match how sdist writes it
Mads Kiilerich <madski@unity3d.com>
parents:
4257
diff
changeset
|
3 tag_svn_revision = 0 |
acaa02179aeb
setup.cfg: update checked-in version to match how sdist writes it
Mads Kiilerich <madski@unity3d.com>
parents:
4257
diff
changeset
|
4 tag_date = 0 |
0 | 5 |
5700
d88077fae3d6
pytest migration: switch to pytest; remove nose support
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
5416
diff
changeset
|
6 [aliases] |
d88077fae3d6
pytest migration: switch to pytest; remove nose support
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
5416
diff
changeset
|
7 test = pytest |
5061
8c1258f69892
tests: Move pytest config (norecursedirs) from tox.ini to setup.cfg
Mads Kiilerich <madski@unity3d.com>
parents:
4988
diff
changeset
|
8 |
0 | 9 [compile_catalog] |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
10 domain = kallithea |
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
11 directory = kallithea/i18n |
0 | 12 statistics = true |
13 | |
14 [extract_messages] | |
15 add_comments = TRANSLATORS: | |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
16 output_file = kallithea/i18n/kallithea.pot |
4248
10df28cbcce7
Correct contact address for translations.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4208
diff
changeset
|
17 msgid-bugs-address = translations@kallithea-scm.org |
4208
ad38f9f93b3b
Correct licensing information in individual files.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
18 copyright-holder = Various authors, licensing as GPLv3 |
3932
3483de9d11e5
updated pot file and extract_messages defaults
Marcin Kuzminski <marcin@python-works.com>
parents:
3158
diff
changeset
|
19 no-wrap = true |
0 | 20 |
21 [init_catalog] | |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
22 domain = kallithea |
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
23 input_file = kallithea/i18n/kallithea.pot |
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
24 output_dir = kallithea/i18n |
0 | 25 |
26 [update_catalog] | |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
27 domain = kallithea |
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
28 input_file = kallithea/i18n/kallithea.pot |
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3960
diff
changeset
|
29 output_dir = kallithea/i18n |
0 | 30 previous = true |
592
0a48c1ec04fc
#37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents:
589
diff
changeset
|
31 |
0a48c1ec04fc
#37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents:
589
diff
changeset
|
32 [build_sphinx] |
0a48c1ec04fc
#37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents:
589
diff
changeset
|
33 source-dir = docs/ |
4988
acaa02179aeb
setup.cfg: update checked-in version to match how sdist writes it
Mads Kiilerich <madski@unity3d.com>
parents:
4257
diff
changeset
|
34 build-dir = docs/_build |
acaa02179aeb
setup.cfg: update checked-in version to match how sdist writes it
Mads Kiilerich <madski@unity3d.com>
parents:
4257
diff
changeset
|
35 all_files = 1 |
592
0a48c1ec04fc
#37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents:
589
diff
changeset
|
36 |
0a48c1ec04fc
#37 fixed json imports for python2.5
Marcin Kuzminski <marcin@python-works.com>
parents:
589
diff
changeset
|
37 [upload_sphinx] |
3932
3483de9d11e5
updated pot file and extract_messages defaults
Marcin Kuzminski <marcin@python-works.com>
parents:
3158
diff
changeset
|
38 upload-dir = docs/_build/html |