Skip to content

Commit 8479673

Browse files
committed
Fix #2248
1 parent adf58bf commit 8479673

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/test.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7618,7 +7618,14 @@ TEST(SNI_AutoDetectionTest, SNI_Logic) {
76187618
SSLClient cli("::1", PORT);
76197619
cli.enable_server_certificate_verification(false);
76207620
auto res = cli.Get("/sni?expected=");
7621-
ASSERT_TRUE(res);
7621+
7622+
// NOTE: This may fail if the server is listening on IPv4 only
7623+
// (e.g., when localhost resolves to 127.0.0.1 only)
7624+
if (res) {
7625+
EXPECT_EQ(StatusCode::OK_200, res->status);
7626+
} else {
7627+
EXPECT_EQ(Error::Connection, res.error());
7628+
}
76227629
}
76237630
}
76247631
}

0 commit comments

Comments
 (0)