Tyro/tests/SFTPTest.cpp
2015-04-29 17:03:15 -04:00

23 lines
448 B
C++

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