Skip to content

Commit 8bc3b05

Browse files
committed
Add new extra test case.
1 parent b0ff731 commit 8bc3b05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: authority/ssh_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,7 @@ func TestIsValidForAddUser(t *testing.T) {
929929
}{
930930
{"ok", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{"john"}}}, false},
931931
{"ok oidc", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{"jane", "jane@smallstep.com"}}}, false},
932+
{"fail at", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{"jane", "@smallstep.com"}}}, true},
932933
{"fail host", args{&ssh.Certificate{CertType: ssh.HostCert, ValidPrincipals: []string{"john"}}}, true},
933934
{"fail principals", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{"john", "jane"}}}, true},
934935
{"fail no principals", args{&ssh.Certificate{CertType: ssh.UserCert, ValidPrincipals: []string{}}}, true},

0 commit comments

Comments
 (0)