File tree 1 file changed +9
-4
lines changed 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -64,16 +64,21 @@ http {
64
64
65
65
EOF
66
66
67
- $t -> try_run(' no inet6 support' )-> plan(3) ;
67
+ $t -> try_run(' no inet6 support' );
68
68
69
- # ##############################################################################
69
+ my @addrs = resolve(' localhost' );
70
+
71
+ plan(skip_all => ' unexpected localhost' ) if @addrs > 2
72
+ || grep { $_ ne ' 127.0.0.1' && $_ ne ' [::1]' } @addrs ;
70
73
71
74
my $p = port(8080);
72
- my @addrs = resolve(' localhost' );
73
75
my $exp = qr /$addrs [0]:$p / if @addrs == 1;
74
76
my $v1 = " $addrs [0]:$p " , my $v2 = " $addrs [1]:$p " if @addrs == 2;
75
77
$exp = qr /\Q $v1 , $v2 \E |\Q $v2 , $v1 \E / if @addrs == 2;
76
- die " too many addresses in localhost" if @addrs > 2;
78
+
79
+ $t -> plan(3);
80
+
81
+ # ##############################################################################
77
82
78
83
like(http_get(' /' ), qr / Not Found/ , ' implicit upstream' );
79
84
like(http_get(' /' ), $exp , ' implicit upstream all tried' );
You can’t perform that action at this time.
0 commit comments