mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
[test] Check that localhosts are whitelisted
This commit is contained in:
@@ -90,6 +90,20 @@ private slots:
|
|||||||
|
|
||||||
delete servent;
|
delete servent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void testWhitelist()
|
||||||
|
{
|
||||||
|
Servent* servent;
|
||||||
|
listenAllBasic( &servent );
|
||||||
|
|
||||||
|
// Check for IPv4 localhost
|
||||||
|
QVERIFY( servent->isIPWhitelisted( QHostAddress::LocalHost ) );
|
||||||
|
|
||||||
|
// Check for IPv6 localhost
|
||||||
|
QVERIFY( servent->isIPWhitelisted( QHostAddress::LocalHostIPv6 ) );
|
||||||
|
|
||||||
|
delete servent;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TOMAHAWK_TESTDATABASE_H
|
#endif // TOMAHAWK_TESTDATABASE_H
|
||||||
|
Reference in New Issue
Block a user