[Kimchi-devel] [PATCH V3 4/4] session expire: update test case

Sheldon shaohef at linux.vnet.ibm.com
Thu Mar 6 03:31:52 UTC 2014


On 03/06/2014 11:09 AM, Royce Lv wrote:
> On 2014年03月06日 07:44, shaohef at linux.vnet.ibm.com wrote:
>> From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>>
>> update test_config.py.in
>>
>> Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>> ---
>>   tests/test_config.py.in | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/tests/test_config.py.in b/tests/test_config.py.in
>> index 06f9300..a2d5f9d 100644
>> --- a/tests/test_config.py.in
>> +++ b/tests/test_config.py.in
>> @@ -90,6 +90,7 @@ class ConfigTests(unittest.TestCase):
>>           Paths.get_prefix = PluginPaths.get_prefix = get_prefix
>>           paths = Paths()
>>           CACHEEXPIRES = 31536000
>> +        SESSIONSTIMEOUT = 10
>>           configObj = {
>>               '/': {'tools.trailing_slash.on': False,
>>                     'request.methods_with_bodies': ('POST', 'PUT'),
>> @@ -99,6 +100,7 @@ class ConfigTests(unittest.TestCase):
>>                     'tools.sessions.httponly': True,
>>                     'tools.sessions.locking': 'explicit',
>>                     'tools.sessions.storage_type': 'ram',
>> +                  'tools.sessions.timeout': SESSIONSTIMEOUT,
>>                     'tools.kimchiauth.on': False},
>>               '/css': {
>>                   'tools.staticdir.on': True,
> Well, I'm not sure this test is enough, for common scenerio, we check 
> if given error is triggered after timeout.
> Can you consider this way?
Sure,
The intention of this patch is just fix the broken of test_config after 
set sessions timeout explicitly.

Sure, I can add a test to get arbitrary URL with the extra header.
But I need to hack the code.
For the sessions timeout is set as 10 minutes.
No tester wants to wait 10 minutes.

>
>


-- 
Thanks and best regards!

Sheldon Feng(冯少合)<shaohef at linux.vnet.ibm.com>
IBM Linux Technology Center




More information about the Kimchi-devel mailing list