From 68ff077ea9e8893ce7d02fad8687fb06687e0f5e Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 19 Mar 2019 15:31:14 -0700 Subject: [PATCH] Improve tests. --- authority/config_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/authority/config_test.go b/authority/config_test.go index ca5de829..b5a57998 100644 --- a/authority/config_test.go +++ b/authority/config_test.go @@ -272,6 +272,17 @@ func TestAuthConfigValidate(t *testing.T) { err: errors.New("provisioner type cannot be empty"), } }, + "fail-invalid-claims": func(t *testing.T) AuthConfigValidateTest { + return AuthConfigValidateTest{ + ac: &AuthConfig{ + Provisioners: p, + Claims: &provisioner.Claims{ + MinTLSDur: &provisioner.Duration{-1}, + }, + }, + err: errors.New("claims: MinTLSCertDuration must be greater than 0"), + } + }, "ok-empty-asn1dn-template": func(t *testing.T) AuthConfigValidateTest { return AuthConfigValidateTest{ ac: &AuthConfig{