Commit 15e470ed authored by Marius Kimmina's avatar Marius Kimmina Committed by GitHub

add positive tests to TestTLS function (#5330)

Signed-off-by: default avatarMarius Kimmina <mar.kimmina@gmail.com>
parent 47c063e2
...@@ -17,6 +17,12 @@ func TestTLS(t *testing.T) { ...@@ -17,6 +17,12 @@ func TestTLS(t *testing.T) {
expectedErrContent string // substring from the expected error. Empty for positive cases. expectedErrContent string // substring from the expected error. Empty for positive cases.
}{ }{
// positive // positive
{"tls test_cert.pem test_key.pem test_ca.pem", false, "", ""},
{"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth nocert\n}", false, "", ""},
{"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth request\n}", false, "", ""},
{"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth require\n}", false, "", ""},
{"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth verify_if_given\n}", false, "", ""},
{"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth require_and_verify\n}", false, "", ""},
// negative // negative
{"tls test_cert.pem test_key.pem test_ca.pem {\nunknown\n}", true, "", "unknown option"}, {"tls test_cert.pem test_key.pem test_ca.pem {\nunknown\n}", true, "", "unknown option"},
// client_auth takes exactly one parameter, which must be one of known keywords. // client_auth takes exactly one parameter, which must be one of known keywords.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment