mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +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
|
#ifndef TOMAHAWK_TESTDATABASE_H
|
||||||
#define TOMAHAWK_TESTDATABASE_H
|
#define TOMAHAWK_TESTDATABASE_H
|
||||||
|
|
||||||
|
#include <QNetworkInterface>
|
||||||
#include <QtTest>
|
#include <QtTest>
|
||||||
|
|
||||||
#include "network/Servent.h"
|
#include "network/Servent.h"
|
||||||
@@ -102,6 +103,12 @@ private slots:
|
|||||||
// Check for IPv6 localhost
|
// Check for IPv6 localhost
|
||||||
QVERIFY( servent->isIPWhitelisted( QHostAddress::LocalHostIPv6 ) );
|
QVERIFY( servent->isIPWhitelisted( QHostAddress::LocalHostIPv6 ) );
|
||||||
|
|
||||||
|
// Verify that all interface addresses are whitelisted.
|
||||||
|
foreach ( QHostAddress addr, QNetworkInterface::allAddresses() )
|
||||||
|
{
|
||||||
|
QVERIFY( servent->isIPWhitelisted( addr ) );
|
||||||
|
}
|
||||||
|
|
||||||
delete servent;
|
delete servent;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user