Improve tests.

This commit is contained in:
Mariano Cano 2019-03-19 15:31:14 -07:00
parent 76618558ae
commit 68ff077ea9

View file

@ -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{