@@ -321,11 +321,11 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
321
321
update = [
322
322
{'space_id' : 512 },
323
323
{'value' : 1 },
324
- {'string' : '=,1 ,some XXXX big string' },
325
- {'float' : '-,2 ,2.1' },
326
- {'double' : '=,3 ,4.1' },
327
- {'bool' : '=,4 ,false' },
328
- {'int' : '%2B,5 ,1001' }
324
+ {'string' : '=,2 ,some XXXX big string' },
325
+ {'float' : '-,3 ,2.1' },
326
+ {'double' : '=,4 ,4.1' },
327
+ {'bool' : '=,5 ,false' },
328
+ {'int' : '%2B,6 ,1001' }
329
329
]
330
330
331
331
expected = [
@@ -371,7 +371,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
371
371
{'index_id' : 1 },
372
372
{'key' : 1 },
373
373
{'key1' : 'str' },
374
- {'string' : '=,2 ,updated string' }
374
+ {'string' : '=,3 ,updated string' }
375
375
]
376
376
377
377
expected = [
@@ -393,7 +393,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
393
393
{'space_id' : 514 },
394
394
{'key' : 2 },
395
395
{'key1' : 'str2' },
396
- {'string' : '=,2 ,Text' }
396
+ {'string' : '=,3 ,Text' }
397
397
]
398
398
399
399
result = get_success (BASE_URL + '/upsert_fmt' , upsert , None , False )
@@ -403,7 +403,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
403
403
{'space_id' : 514 },
404
404
{'key' : 2 },
405
405
{'key1' : 'str2' },
406
- {'string' : '=,2 ,' }
406
+ {'string' : '=,3 ,' }
407
407
]
408
408
409
409
result = get_success (BASE_URL + '/upsert_fmt' , upsert , None , False )
@@ -445,8 +445,8 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
445
445
result = post_form_success (BASE_URL + '/select_post' , {'id' : 11 }, None )
446
446
assert result ['result' ][0 ][0 ] == 11 and result ['result' ][1 ][0 ] == 12 , \
447
447
'Expected != result'
448
- result = post_form_success (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,1 ,TEXT' ,
449
- 'value1' : '=,2 ,3.14' }, None )
448
+ result = post_form_success (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,2 ,TEXT' ,
449
+ 'value1' : '=,3 ,3.14' }, None )
450
450
assert result ['result' ][0 ][0 ] == 12 and result ['result' ][0 ][1 ] == 'TEXT' \
451
451
and result ['result' ][0 ][2 ] == 3.14 , 'Expected != result'
452
452
@@ -457,27 +457,25 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
457
457
print ('[+] Update format validation' )
458
458
459
459
_ , result = post_form (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,TEXT' ,
460
- 'value1' : '=,2 ,3.14' }, None )
460
+ 'value1' : '=,3 ,3.14' }, None )
461
461
assert _ == 400 and 'error' in result , 'Expected != result'
462
462
463
463
_ , result = post_form (BASE_URL + '/update_post' , {'id' : 12 , 'value' : 'TEXT' ,
464
- 'value1' : '=,2 ,3.14' }, None )
464
+ 'value1' : '=,3 ,3.14' }, None )
465
465
assert _ == 400 and 'error' in result , 'Expected != result'
466
466
_ , result = post_form (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,,TEXT' ,
467
- 'value1' : '=,2 ,3.14' }, None )
467
+ 'value1' : '=,4 ,3.14' }, None )
468
468
assert _ == 400 and 'error' in result , 'Expected != result'
469
469
_ , result = post_form (BASE_URL + '/update_post' , {'id' : 12 , 'value' : '=,TEXT' ,
470
- 'value1' : '=,2 ,3.14' }, None )
470
+ 'value1' : '=,3 ,3.14' }, None )
471
471
assert _ == 400 and 'error' in result , 'Expected != result'
472
472
473
473
print ('[+] OK' )
474
474
475
475
# ============
476
476
#
477
- print (''' [+] Issues
478
- https://github.com/tarantool/nginx_upstream_module/issues/110 and
479
- https://github.com/tarantool/nginx_upstream_module/issues/111
480
- ''' )
477
+ print ('''[+] Issues https://github.com/tarantool/nginx_upstream_module/issues/110 and
478
+ https://github.com/tarantool/nginx_upstream_module/issues/111''' )
481
479
482
480
## Issue 111
483
481
_ , result = delete (BASE_URL + '/issue_110_and_111' , \
@@ -489,7 +487,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
489
487
None )
490
488
491
489
result = put_success (BASE_URL + '/issue_110_and_111' , \
492
- {'key' : 'test_inc' , 'value' : '#,1 ,10' }, None , True )
490
+ {'key' : 'test_inc' , 'value' : '#,2 ,10' }, None , True )
493
491
assert result [0 ] == 'test_inc' , "Expected != Result"
494
492
495
493
result = get_success (BASE_URL + '/issue_110_and_111' , \
@@ -508,7 +506,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
508
506
None )
509
507
510
508
_ , result = patch (BASE_URL + '/issue_110_and_111' , \
511
- {'key' : 'test_inc_2' , 'new_value' : 1 , 'updated_value' : '+,1 ,5' })
509
+ {'key' : 'test_inc_2' , 'new_value' : 1 , 'updated_value' : '+,2 ,5' })
512
510
assert _ == 200 and 'result' in result and 'id' in result , \
513
511
'expected: result and id'
514
512
@@ -517,7 +515,7 @@ def arr_of_dicts_to_arr(arr_of_dicts, start_from = 0):
517
515
assert result [1 ] == 6 , "Expected != Result"
518
516
519
517
_ , result = patch (BASE_URL + '/issue_110_and_111' , \
520
- {'key' : 'test_inc_2' , 'new_value' : 1 , 'updated_value' : '=,1 ,5' })
518
+ {'key' : 'test_inc_2' , 'new_value' : 1 , 'updated_value' : '=,2 ,5' })
521
519
assert _ == 200 and 'result' in result and 'id' in result , \
522
520
'expected: result and id'
523
521
result = get_success (BASE_URL + '/issue_110_and_111' , \
0 commit comments