aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2019-10-03 17:43:31 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-10-25 16:11:17 +0200
commit5aecfb5a966d484f419d941923e5b2536ac7e2b2 (patch)
tree98e1bd51f1bdea2b36454c4b390521c57f8276b6
parent50b37f299148067dd316d167c4a21ecd87eca84d (diff)
downloadlibssh-5aecfb5a966d484f419d941923e5b2536ac7e2b2.tar.gz
libssh-5aecfb5a966d484f419d941923e5b2536ac7e2b2.tar.xz
libssh-5aecfb5a966d484f419d941923e5b2536ac7e2b2.zip
tests: Do not parse global configuration when testing server
This removes the tests which uses external configuration files. This makes the tests no not change behaviour depending on the environment they are being executed. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com> (cherry picked from commit 85239c8ea04b32ce84280508d6860f8032a55d83)
-rw-r--r--tests/server/torture_server_config.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/tests/server/torture_server_config.c b/tests/server/torture_server_config.c
index 89e8de61..8fd9fc01 100644
--- a/tests/server/torture_server_config.c
+++ b/tests/server/torture_server_config.c
@@ -468,9 +468,6 @@ static void torture_server_config_hostkey(void **state)
"HostKey %s\n",
hostkey_files[i]);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
}
@@ -510,9 +507,6 @@ static void torture_server_config_ciphers(void **state)
"HostKey %s\nCiphers %s\n",
hostkey_files[i], ciphers);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -524,9 +518,6 @@ static void torture_server_config_ciphers(void **state)
"HostKey %s\nCiphers %s\n",
hostkey_files[i], tokens->tokens[j]);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -571,9 +562,6 @@ static void torture_server_config_macs(void **state)
"HostKey %s\nMACs %s\n",
hostkey_files[i], macs);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -585,9 +573,6 @@ static void torture_server_config_macs(void **state)
"HostKey %s\nMACs %s\n",
hostkey_files[i], tokens->tokens[j]);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -632,9 +617,6 @@ static void torture_server_config_kex(void **state)
"HostKey %s\nKexAlgorithms %s\n",
hostkey_files[i], kex);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -646,9 +628,6 @@ static void torture_server_config_kex(void **state)
"HostKey %s\nKexAlgorithms %s\n",
hostkey_files[i], tokens->tokens[j]);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -688,9 +667,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostKeyAlgorithms %s\n",
hostkey_files[i], allowed);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
}
@@ -704,9 +680,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostkeyAlgorithms %s\n",
tss->ed25519_hostkey, "ssh-ed25519");
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -716,9 +689,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostkeyAlgorithms %s\n",
tss->rsa_hostkey, "ssh-rsa");
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
}
@@ -729,9 +699,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostkeyAlgorithms %s\n",
tss->rsa_hostkey, "rsa-sha2-256");
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -741,9 +708,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostkeyAlgorithms %s\n",
tss->rsa_hostkey, "rsa-sha2-512");
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -753,9 +717,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostkeyAlgorithms %s\n",
tss->ecdsa_256_hostkey, "ecdsa-sha2-nistp256");
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -765,9 +726,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostkeyAlgorithms %s\n",
tss->ecdsa_384_hostkey, "ecdsa-sha2-nistp384");
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -777,9 +735,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostkeyAlgorithms %s\n",
tss->ecdsa_521_hostkey, "ecdsa-sha2-nistp521");
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
@@ -791,9 +746,6 @@ static void torture_server_config_hostkey_algorithms(void **state)
"HostKey %s\nHostkeyAlgorithms %s\n",
tss->dsa_hostkey, "ssh-dss");
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
}
@@ -815,9 +767,6 @@ static void torture_server_config_unknown(void **state)
"HostKey %s\nUnknownOption unknown-value1,unknown-value2\n",
tss->rsa_hostkey);
- rc = try_config_content(state, config_content, true);
- assert_int_equal(rc, 0);
-
rc = try_config_content(state, config_content, false);
assert_int_equal(rc, 0);
}