[libcalamares] Expand network service test

- Do an actual ping (also to check for memory leaks)
main
Adriaan de Groot 6 years ago
parent b8d56bb4a6
commit 8d3530154f

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

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

Loading…
Cancel
Save