mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +09:00
tests: Some fixes for sftp_dir.
This commit is contained in:
@@ -6,19 +6,20 @@
|
|||||||
static void setup(void **state) {
|
static void setup(void **state) {
|
||||||
ssh_session session;
|
ssh_session session;
|
||||||
struct torture_sftp *t;
|
struct torture_sftp *t;
|
||||||
char *host;
|
const char *host;
|
||||||
char *user;
|
const char *user;
|
||||||
char *password;
|
const char *password;
|
||||||
|
|
||||||
host = getenv("TORTURE_HOST");
|
host = getenv("TORTURE_HOST");
|
||||||
if (host == NULL) {
|
if (host == NULL) {
|
||||||
host = (char *) "localhost";
|
host = "localhost";
|
||||||
}
|
}
|
||||||
|
|
||||||
user = getenv("TORTURE_USER");
|
user = getenv("TORTURE_USER");
|
||||||
password = getenv("TORTURE_PASSWORD");
|
password = getenv("TORTURE_PASSWORD");
|
||||||
|
|
||||||
session = torture_ssh_session(host, user, password);
|
session = torture_ssh_session(host, user, password);
|
||||||
|
assert_false(session == NULL);
|
||||||
t = torture_sftp_session(session);
|
t = torture_sftp_session(session);
|
||||||
assert_false(t == NULL);
|
assert_false(t == NULL);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user