tests: Do not process config when reinitializing session
Do not process system-wide configuration when reinitializing a session during testing. This could lead to different settings set from the expected one (which was initialized during test setup). Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
d4fe8e1f62
Коммит
f97a8b4e3f
@ -103,6 +103,7 @@ static void torture_knownhosts_port(void **state) {
|
|||||||
char *p;
|
char *p;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
int rc;
|
int rc;
|
||||||
|
bool process_config = false;
|
||||||
|
|
||||||
snprintf(tmp_file,
|
snprintf(tmp_file,
|
||||||
sizeof(tmp_file),
|
sizeof(tmp_file),
|
||||||
@ -137,6 +138,7 @@ static void torture_knownhosts_port(void **state) {
|
|||||||
/* Now, connect back to the ssh server and verify the known host line */
|
/* Now, connect back to the ssh server and verify the known host line */
|
||||||
s->ssh.session = session = ssh_new();
|
s->ssh.session = session = ssh_new();
|
||||||
|
|
||||||
|
ssh_options_set(session, SSH_OPTIONS_PROCESS_CONFIG, &process_config);
|
||||||
ssh_options_set(session, SSH_OPTIONS_HOST, TORTURE_SSH_SERVER);
|
ssh_options_set(session, SSH_OPTIONS_HOST, TORTURE_SSH_SERVER);
|
||||||
ssh_options_set(session, SSH_OPTIONS_KNOWNHOSTS, known_hosts_file);
|
ssh_options_set(session, SSH_OPTIONS_KNOWNHOSTS, known_hosts_file);
|
||||||
free(known_hosts_file);
|
free(known_hosts_file);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user