From 8bc3b05232c2992f5e73eca81eda6e0c1a772d05 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Fri, 24 Apr 2020 10:27:44 -0700 Subject: [PATCH] Add new extra test case. --- authority/ssh_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/authority/ssh_test.go b/authority/ssh_test.go index e30ff60b..0fae9cef 100644 --- a/authority/ssh_test.go +++ b/authority/ssh_test.go @@ -929,6 +929,7 @@ func TestIsValidForAddUser(t *testing.T) { }{ {"ok", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{"john"}}}, false}, {"ok oidc", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{"jane", "jane@smallstep.com"}}}, false}, + {"fail at", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{"jane", "@smallstep.com"}}}, true}, {"fail host", args{&ssh.Certificate{CertType: ssh.HostCert, ValidPrincipals: []string{"john"}}}, true}, {"fail principals", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{"john", "jane"}}}, true}, {"fail no principals", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{}}}, true},