aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marius Kimmina <38843153+mariuskimmina@users.noreply.github.com> 2022-04-25 16:36:50 +0200
committerGravatar GitHub <noreply@github.com> 2022-04-25 07:36:50 -0700
commit15e470ed24ba427de92e6fcd73e26fc119a45890 (patch)
tree6fd4d1702dcd975686fa2979fb537a835639cdde
parent47c063e21798344ac3478c9378a4606c2e109238 (diff)
downloadcoredns-15e470ed24ba427de92e6fcd73e26fc119a45890.tar.gz
coredns-15e470ed24ba427de92e6fcd73e26fc119a45890.tar.zst
coredns-15e470ed24ba427de92e6fcd73e26fc119a45890.zip
add positive tests to TestTLS function (#5330)
Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com>
-rw-r--r--plugin/tls/tls_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/tls/tls_test.go b/plugin/tls/tls_test.go
index 5aef82f34..7deb837f3 100644
--- a/plugin/tls/tls_test.go
+++ b/plugin/tls/tls_test.go
@@ -17,6 +17,12 @@ func TestTLS(t *testing.T) {
expectedErrContent string // substring from the expected error. Empty for positive cases.
}{
// 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
{"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.