Skip to content

Commit bb9d02b

Browse files
committed
Tests: removed HTTP/2 NPN tests.
Support for NPN negotiation was removed in 1.21.4.
1 parent 17c6a06 commit bb9d02b

File tree

2 files changed

+2
-67
lines changed

2 files changed

+2
-67
lines changed

h2_ssl_proxy_cache.t

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ open OLDERR, ">&", \*STDERR; close STDERR;
9292
$t->run();
9393
open STDERR, ">&", \*OLDERR;
9494

95-
plan(skip_all => 'no ALPN/NPN negotiation') unless defined getconn(port(8080));
95+
plan(skip_all => 'no ALPN negotiation') unless defined getconn(port(8080));
9696
$t->plan(1);
9797

9898
###############################################################################
@@ -129,15 +129,6 @@ sub getconn {
129129
if $sock->alpn_selected();
130130
};
131131

132-
return $s if defined $s;
133-
134-
eval {
135-
my $sock = Test::Nginx::HTTP2::new_socket($port, SSL => 1,
136-
npn => 'h2');
137-
$s = Test::Nginx::HTTP2->new($port, socket => $sock)
138-
if $sock->next_proto_negotiated();
139-
};
140-
141132
return $s;
142133
}
143134

h2_ssl_variables.t

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ select STDERR; $| = 1;
2424
select STDOUT; $| = 1;
2525

2626
my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 rewrite socket_ssl/)
27-
->has_daemon('openssl')->plan(8);
27+
->has_daemon('openssl')->plan(4);
2828

2929
$t->write_file_expand('nginx.conf', <<'EOF');
3030
@@ -93,20 +93,6 @@ my $has_npn = eval { Test::Nginx::HTTP2::new_socket(port(8080), SSL => 1,
9393
my $has_alpn = eval { Test::Nginx::HTTP2::new_socket(port(8080), SSL => 1,
9494
alpn => 'h2')->alpn_selected() };
9595

96-
# SSL/TLS connection, NPN
97-
98-
SKIP: {
99-
skip 'OpenSSL NPN support required', 1 unless $has_npn;
100-
101-
$s = Test::Nginx::HTTP2->new(port(8080), SSL => 1, npn => 'h2');
102-
$sid = $s->new_stream({ path => '/h2' });
103-
$frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
104-
105-
($frame) = grep { $_->{type} eq "DATA" } @$frames;
106-
is($frame->{data}, 'h2', 'http variable - npn');
107-
108-
}
109-
11096
# SSL/TLS connection, ALPN
11197

11298
SKIP: {
@@ -121,20 +107,6 @@ is($frame->{data}, 'h2', 'http variable - alpn');
121107

122108
}
123109

124-
# $server_protocol - SSL/TLS connection, NPN
125-
126-
SKIP: {
127-
skip 'OpenSSL NPN support required', 1 unless $has_npn;
128-
129-
$s = Test::Nginx::HTTP2->new(port(8080), SSL => 1, npn => 'h2');
130-
$sid = $s->new_stream({ path => '/sp' });
131-
$frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
132-
133-
($frame) = grep { $_->{type} eq "DATA" } @$frames;
134-
is($frame->{data}, 'HTTP/2.0', 'server_protocol variable - npn');
135-
136-
}
137-
138110
# $server_protocol - SSL/TLS connection, ALPN
139111

140112
SKIP: {
@@ -149,20 +121,6 @@ is($frame->{data}, 'HTTP/2.0', 'server_protocol variable - alpn');
149121

150122
}
151123

152-
# $scheme - SSL/TLS connection, NPN
153-
154-
SKIP: {
155-
skip 'OpenSSL NPN support required', 1 unless $has_npn;
156-
157-
$s = Test::Nginx::HTTP2->new(port(8080), SSL => 1, npn => 'h2');
158-
$sid = $s->new_stream({ path => '/scheme' });
159-
$frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
160-
161-
($frame) = grep { $_->{type} eq "DATA" } @$frames;
162-
is($frame->{data}, 'https', 'scheme variable - npn');
163-
164-
}
165-
166124
# $scheme - SSL/TLS connection, ALPN
167125

168126
SKIP: {
@@ -177,20 +135,6 @@ is($frame->{data}, 'https', 'scheme variable - alpn');
177135

178136
}
179137

180-
# $https - SSL/TLS connection, NPN
181-
182-
SKIP: {
183-
skip 'OpenSSL NPN support required', 1 unless $has_npn;
184-
185-
$s = Test::Nginx::HTTP2->new(port(8080), SSL => 1, npn => 'h2');
186-
$sid = $s->new_stream({ path => '/https' });
187-
$frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
188-
189-
($frame) = grep { $_->{type} eq "DATA" } @$frames;
190-
is($frame->{data}, 'on', 'https variable - npn');
191-
192-
}
193-
194138
# $https - SSL/TLS connection, ALPN
195139

196140
SKIP: {

0 commit comments

Comments
 (0)