OSDN Git Service

SSH: Adapt tests to API change.
authorChristian Kandeler <christian.kandeler@nokia.com>
Wed, 6 Apr 2011 07:38:13 +0000 (09:38 +0200)
committerChristian Kandeler <christian.kandeler@nokia.com>
Wed, 6 Apr 2011 08:31:42 +0000 (10:31 +0200)
tests/manual/ssh/errorhandling/main.cpp
tests/manual/ssh/sftp/sftptest.cpp

index 3900ab4..c3f9d8e 100644 (file)
@@ -49,7 +49,7 @@ public:
     Test()
     {
         m_timeoutTimer.setSingleShot(true);
-        m_connection = SshConnection::create();
+        m_connection = SshConnection::create(SshConnectionParameters(SshConnectionParameters::DefaultProxy));
         if (m_connection->state() != SshConnection::Unconnected) {
             qDebug("Error: Newly created SSH connection has state %d.",
                 m_connection->state());
@@ -166,7 +166,7 @@ private:
     {
         if (m_connection)
             disconnect(m_connection.data(), 0, this, 0);
-        m_connection = SshConnection::create();
+        m_connection = SshConnection::create(m_testSet.first().params);
         connect(m_connection.data(), SIGNAL(connected()), this,
             SLOT(handleConnected()));
         connect(m_connection.data(), SIGNAL(disconnected()), this,
@@ -179,7 +179,7 @@ private:
         m_timeoutTimer.stop();
         m_timeoutTimer.setInterval(qMax(10000, nextItem.params.timeout * 1000));
         qDebug("Testing: %s", nextItem.description);
-        m_connection->connectToHost(m_testSet.first().params);
+        m_connection->connectToHost();
     }
 
     SshConnection::Ptr m_connection;
index 8e795ee..d9f01f5 100644 (file)
@@ -58,7 +58,7 @@ SftpTest::~SftpTest()
 
 void SftpTest::run()
 {
-    m_connection = SshConnection::create();
+    m_connection = SshConnection::create(m_parameters.sshParams);
     connect(m_connection.data(), SIGNAL(connected()), this,
         SLOT(handleConnected()));
     connect(m_connection.data(), SIGNAL(error(Utils::SshError)), this,
@@ -68,7 +68,7 @@ void SftpTest::run()
     std::cout << "Connecting to host '"
         << qPrintable(m_parameters.sshParams.host) << "'..." << std::endl;
     m_state = Connecting;
-    m_connection->connectToHost(m_parameters.sshParams);
+    m_connection->connectToHost();
 }
 
 void SftpTest::handleConnected()