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:
parent
de1d63a135
commit
34d261e2aa
@ -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;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user