changeset 1462:fe886814b25a

Tests: removed HTTP/2 proxy cache TODO tests for empty DATA frame. RFC7540 doesn't forbid sending of an empty DATA frame at the end of a stream.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 09 Apr 2019 18:52:53 +0300
parents 7959e58429d0
children 5ac92857e419
files h2_proxy_cache.t
diffstat 1 files changed, 1 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/h2_proxy_cache.t
+++ b/h2_proxy_cache.t
@@ -23,7 +23,7 @@ use Test::Nginx::HTTP2;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http http_v2 proxy cache/)->plan(12)
+my $t = Test::Nginx->new()->has(qw/http http_v2 proxy cache/)->plan(9)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -130,22 +130,6 @@ ok($frame, 'proxy cache - request body -
 push @$frames, $_ for @{$s->read(all => [{ sid => $sid }], wait => 0.2)};
 ok(!grep ({ $_->{type} eq "DATA" } @$frames), 'proxy cache HEAD - no body');
 
-# proxy cache - expect no stray empty DATA frame
-
-TODO: {
-local $TODO = 'not yet';
-
-$s = Test::Nginx::HTTP2->new();
-$sid = $s->new_stream({ path => '/cache/t.html?2' });
-
-$frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
-my @data = grep ({ $_->{type} eq "DATA" } @$frames);
-is(@data, 1, 'proxy cache write - data frames');
-is(join(' ', map { $_->{data} } @data), 'SEE-THIS', 'proxy cache write - data');
-is(join(' ', map { $_->{flags} } @data), '1', 'proxy cache write - flags');
-
-}
-
 # HEAD on empty cache with proxy_buffering off
 
 $s = Test::Nginx::HTTP2->new();