add positive tests to TestTLS function (#5330)
Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com>
This commit is contained in:
parent
47c063e217
commit
15e470ed24
1 changed files with 6 additions and 0 deletions
|
@ -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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue