annotate package.json @ 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 6c3bb9a845d7
children b66725ba01ed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6953
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
1 {
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
2 "name": "kallithea",
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
3 "private": true,
7057
a9cbc30e19fa less: build custom Bootstrap from bootstrap.less instead of using plain upstream version
domruf <dominikruf@gmail.com>
parents: 7056
diff changeset
4 "dependencies": {
a9cbc30e19fa less: build custom Bootstrap from bootstrap.less instead of using plain upstream version
domruf <dominikruf@gmail.com>
parents: 7056
diff changeset
5 "bootstrap": "3.3.7"
a9cbc30e19fa less: build custom Bootstrap from bootstrap.less instead of using plain upstream version
domruf <dominikruf@gmail.com>
parents: 7056
diff changeset
6 },
6953
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
7 "devDependencies": {
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
8 "less": "~2.7",
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
9 "less-plugin-clean-css": "~1.5"
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
10 },
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
11 "scripts": {
7245
6c3bb9a845d7 less: generate map files when building style.css with 'npm run less'
domruf <dominikruf@gmail.com>
parents: 7099
diff changeset
12 "less": "lessc --relative-urls --source-map --source-map-less-inline kallithea/public/less/main.less kallithea/public/css/style.css"
6953
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
13 }
42718729687e style: use npm less to generate kallithea stylesheet style.css from style.less
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
diff changeset
14 }