mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
ksysguard: adjust ksysguardd test to kdelibs changes
for reference:
107a01f0e0
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
491dd0ab8c
commit
d0f0047daa
1 changed files with 5 additions and 3 deletions
|
@ -1,11 +1,13 @@
|
|||
#include "ksysguarddtest.h"
|
||||
#include <QtTest>
|
||||
#include <QtCore/qnamespace.h>
|
||||
#include <KStandardDirs>
|
||||
|
||||
KSGRD::SensorAgent *agent;
|
||||
|
||||
Q_DECLARE_METATYPE(KSGRD::SensorAgent *)
|
||||
|
||||
static const QString ksysguarddexe = KStandardDirs::findExe("ksysguardd");
|
||||
|
||||
using namespace KSGRD;
|
||||
void TestKsysguardd::initTestCase()
|
||||
{
|
||||
|
@ -14,7 +16,7 @@ void TestKsysguardd::initTestCase()
|
|||
hostConnectionLostSpy = new QSignalSpy(&manager, SIGNAL(hostConnectionLost(QString)));
|
||||
updateSpy = new QSignalSpy(&manager, SIGNAL(update()));
|
||||
hostAddedSpy = new QSignalSpy(&manager, SIGNAL(hostAdded(KSGRD::SensorAgent*,QString)));
|
||||
bool success = manager.engage("", "", "../../ksysguardd/ksysguardd", -1);
|
||||
bool success = manager.engage("", "", ksysguarddexe, -1);
|
||||
QCOMPARE(hostAddedSpy->count(), 1);
|
||||
QVERIFY(success);
|
||||
QVERIFY(manager.isConnected(""));
|
||||
|
@ -50,7 +52,7 @@ void TestKsysguardd::testSetup()
|
|||
bool success = manager.hostInfo("", shell, command, port );
|
||||
QCOMPARE(success, true);
|
||||
QCOMPARE(shell, QString(""));
|
||||
QCOMPARE(command, QString("../../ksysguardd/ksysguardd"));
|
||||
QCOMPARE(command, ksysguarddexe);
|
||||
QCOMPARE(port, -1);
|
||||
|
||||
success = manager.hostInfo("nonexistant host", shell, command, port );
|
||||
|
|
Loading…
Add table
Reference in a new issue