mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
test/admin_socket: check error message according to OS
Signed-off-by: Yan, Zheng <zyan@redhat.com>
This commit is contained in:
parent
f6fa4a28d1
commit
b06838a09d
@ -217,7 +217,12 @@ TEST(AdminSocketClient, Ping) {
|
||||
{
|
||||
bool ok;
|
||||
std::string result = client.ping(&ok);
|
||||
EXPECT_NE(std::string::npos, result.find("Connection refused"));
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
const char* errmsg = "Socket operation on non-socket";
|
||||
#else
|
||||
const char* errmsg = "Connection refused";
|
||||
#endif
|
||||
EXPECT_NE(std::string::npos, result.find(errmsg));
|
||||
ASSERT_FALSE(ok);
|
||||
}
|
||||
// a daemon is connected to the socket
|
||||
|
Loading…
Reference in New Issue
Block a user