1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-18 23:17:59 +01:00

[test] Check that all addresses on all interfaces are whitelisted

This commit is contained in:
Uwe L. Korn 2014-08-26 14:25:35 +01:00
parent de1d63a135
commit 34d261e2aa

View File

@ -19,6 +19,7 @@
#ifndef TOMAHAWK_TESTDATABASE_H
#define TOMAHAWK_TESTDATABASE_H
#include <QNetworkInterface>
#include <QtTest>
#include "network/Servent.h"
@ -102,6 +103,12 @@ private slots:
// Check for IPv6 localhost
QVERIFY( servent->isIPWhitelisted( QHostAddress::LocalHostIPv6 ) );
// Verify that all interface addresses are whitelisted.
foreach ( QHostAddress addr, QNetworkInterface::allAddresses() )
{
QVERIFY( servent->isIPWhitelisted( addr ) );
}
delete servent;
}
};