[libcalamares] Expand network service test
- Do an actual ping (also to check for memory leaks)
This commit is contained in:
parent
b8d56bb4a6
commit
8d3530154f
@ -24,20 +24,25 @@
|
|||||||
|
|
||||||
QTEST_GUILESS_MAIN( NetworkTests )
|
QTEST_GUILESS_MAIN( NetworkTests )
|
||||||
|
|
||||||
NetworkTests::NetworkTests()
|
NetworkTests::NetworkTests() {}
|
||||||
|
|
||||||
|
NetworkTests::~NetworkTests() {}
|
||||||
|
|
||||||
|
void
|
||||||
|
NetworkTests::initTestCase()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkTests::~NetworkTests()
|
void
|
||||||
{
|
NetworkTests::testInstance()
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkTests::initTestCase()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkTests::testInstance()
|
|
||||||
{
|
{
|
||||||
auto& nam = CalamaresUtils::Network::Manager::instance();
|
auto& nam = CalamaresUtils::Network::Manager::instance();
|
||||||
QVERIFY( !nam.hasInternet() );
|
QVERIFY( !nam.hasInternet() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
NetworkTests::testPing()
|
||||||
|
{
|
||||||
|
auto& nam = CalamaresUtils::Network::Manager::instance();
|
||||||
|
QVERIFY( nam.synchronousPing( QUrl( "https://www.kde.org" ) ) );
|
||||||
|
}
|
||||||
|
@ -32,6 +32,7 @@ private Q_SLOTS:
|
|||||||
void initTestCase();
|
void initTestCase();
|
||||||
|
|
||||||
void testInstance();
|
void testInstance();
|
||||||
|
void testPing();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user