Skip to content

Commit

Permalink
test ipv6 in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
deweerdt committed Feb 29, 2024
1 parent fef625b commit 731f011
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions t/40http3-forward.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plan skip_all => "macOS has issues https://twitter.com/kazuho/status/12980731105
my $quic_port = empty_port({ host => "0.0.0.0", proto => "udp" });

# start server1 at 0.0.0.0, check that it is up
my $server1 = spawn("0.0.0.0", 1);
my $server1 = spawn("*", 1);
is do {my $fh = fetch(""); local $/; join "", <$fh> }, "server=1", "server1 is up";

# initiate the slow request
Expand Down Expand Up @@ -66,19 +66,22 @@ done_testing;

sub spawn {
my ($listen_ip, $server_id) = @_;
my $host_directive = "";
if ($listen_ip ne "*") {
$host_directive = "\n host: $listen_ip";
}
my $conf = {opts => [qw(-m worker)], conf => <<"EOT"};
num-threads: 1
listen:
type: quic
host: $listen_ip
type: quic$host_directive
port: $quic_port
ssl:
key-file: examples/h2o/server.key
certificate-file: examples/h2o/server.crt
quic-nodes:
self: $server_id
mapping:
1: "127.0.0.2:$quic_port" # server1 can be reached at 127.0.0.2 too
1: "[::1]:$quic_port" # server1 can be reached over ipv6 as well
2: "127.0.0.1:$quic_port"
ssl-session-resumption:
mode: ticket
Expand Down

0 comments on commit 731f011

Please sign in to comment.