Tyro/tests/SFTPTest.cpp

23 lines
448 B
C++
Raw Normal View History

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2015-04-29 17:03:15 -04:00
#include "../src/base/network/SFTP.h"
TEST_CASE("ssh connections work", "[SFTP]") {
2015-04-08 11:06:24 -04:00
SFTP *sftp = new SFTP("shell.xshellz.com", "twarren", "of0fmk2dsj");
sftp->getFingerprint();
SECTION("sftp object is not null") {
REQUIRE(sftp != NULL);
}
2015-04-08 11:06:24 -04:00
SECTION("can retreive a file") {
string file;
2015-04-08 11:06:24 -04:00
file = sftp->getFile("test.txt");
REQUIRE(file != "");
2015-04-08 11:06:24 -04:00
REQUIRE(file == "SFTP works!\n");
}
}