From 42ce989488114aa55b333efca547da9a5ea6bcfc Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 3 Dec 2018 18:44:01 +0100 Subject: [PATCH] tests: Cover missing parts of the config parsing Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider --- tests/unittests/torture_config.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/unittests/torture_config.c b/tests/unittests/torture_config.c index 5a8452da..6957fe56 100644 --- a/tests/unittests/torture_config.c +++ b/tests/unittests/torture_config.c @@ -75,6 +75,11 @@ static int setup_config_files(void **state) "\tConnectTimeout 30\n" "\tLogLevel DEBUG3\n" "\tGlobalKnownHostsFile "GLOBAL_KNOWN_HOSTS"\n" + "\tCompression yes\n" + "\tStrictHostkeyChecking no\n" + "\tGSSAPIDelegateCredentials yes\n" + "\tGSSAPIServerIdentity example.com\n" + "\tGSSAPIClientIdentity home.sweet\n" "\tUserKnownHostsFile "USER_KNOWN_HOSTS"\n"); /* authentication methods */ @@ -249,6 +254,14 @@ static void torture_config_new(void **state) assert_string_equal(session->opts.global_knownhosts, GLOBAL_KNOWN_HOSTS); assert_int_equal(session->opts.timeout, 30); assert_string_equal(session->opts.bindaddr, BIND_ADDRESS); + assert_string_equal(session->opts.wanted_methods[SSH_COMP_C_S], + "zlib@openssh.com,zlib"); + assert_string_equal(session->opts.wanted_methods[SSH_COMP_S_C], + "zlib@openssh.com,zlib"); + assert_int_equal(session->opts.StrictHostKeyChecking, 0); + assert_int_equal(session->opts.gss_delegate_creds, 1); + assert_string_equal(session->opts.gss_server_identity, "example.com"); + assert_string_equal(session->opts.gss_client_identity, "home.sweet"); assert_int_equal(ssh_get_log_level(), SSH_LOG_TRACE); assert_int_equal(session->common.log_verbosity, SSH_LOG_TRACE);