comparison js_subrequests.t @ 1520:9521130f6f22

Tests: js TODO adjusted.
author Dmitry Volyntsev <xeioex@nginx.com>
date Tue, 15 Oct 2019 19:36:25 +0300
parents 34e86a28cabd
children 41dcbcf3381a
comparison
equal deleted inserted replaced
1519:787d904bdfe0 1520:9521130f6f22
524 http_get('/sr_except_not_a_func'); 524 http_get('/sr_except_not_a_func');
525 http_get('/sr_except_failed_to_convert_arg'); 525 http_get('/sr_except_failed_to_convert_arg');
526 http_get('/sr_except_failed_to_convert_options_arg'); 526 http_get('/sr_except_failed_to_convert_options_arg');
527 http_get('/sr_uri_except'); 527 http_get('/sr_uri_except');
528 528
529 TODO: {
530 local $TODO = 'not yet'
531 unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.4';
532
533 is(get_json('/sr_js_in_sr_parent'), 529 is(get_json('/sr_js_in_sr_parent'),
534 '{"e":"parent can only be returned for a subrequest"}', 530 '{"e":"parent can only be returned for a subrequest"}',
535 'parent in subrequest js_content'); 531 'parent in subrequest js_content');
536 532
537 todo_skip 'leaves coredump', 1
538 unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.4';
539
540 is(get_json('/sr_in_sr_callback'), 533 is(get_json('/sr_in_sr_callback'),
541 '{"e":"subrequest can only be created for the primary request"}', 534 '{"e":"subrequest can only be created for the primary request"}',
542 'subrequest for non-primary request'); 535 'subrequest for non-primary request');
543
544 }
545 536
546 $t->stop(); 537 $t->stop();
547 538
548 ok(index($t->read_file('error.log'), 'callback is not a function') > 0, 539 ok(index($t->read_file('error.log'), 'callback is not a function') > 0,
549 'subrequest cb exception'); 540 'subrequest cb exception');