[libcalamares] Expand network service test

- Do an actual ping (also to check for memory leaks)
This commit is contained in:
Adriaan de Groot 2019-08-20 09:57:04 -04:00
parent b8d56bb4a6
commit 8d3530154f
2 changed files with 16 additions and 10 deletions

View File

@ -24,20 +24,25 @@
QTEST_GUILESS_MAIN( NetworkTests )
NetworkTests::NetworkTests()
NetworkTests::NetworkTests() {}
NetworkTests::~NetworkTests() {}
void
NetworkTests::initTestCase()
{
}
NetworkTests::~NetworkTests()
{
}
void NetworkTests::initTestCase()
{
}
void NetworkTests::testInstance()
void
NetworkTests::testInstance()
{
auto& nam = CalamaresUtils::Network::Manager::instance();
QVERIFY( !nam.hasInternet() );
}
void
NetworkTests::testPing()
{
auto& nam = CalamaresUtils::Network::Manager::instance();
QVERIFY( nam.synchronousPing( QUrl( "https://www.kde.org" ) ) );
}

View File

@ -32,6 +32,7 @@ private Q_SLOTS:
void initTestCase();
void testInstance();
void testPing();
};
#endif