mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 20:00:13 +02:00
[test] Check that all addresses on all interfaces are whitelisted
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user