mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 16:12:18 +02:00
add more test cases for valid usernames
This commit is contained in:
@@ -920,7 +920,7 @@ func TestCrossNamespacedSecrets(t *testing.T) {
|
||||
func TestValidUsernames(t *testing.T) {
|
||||
testName := "test username validity"
|
||||
|
||||
invalidUsernames := []string{"_", ".", ".user", "appspace.", "appspace.user.extra", "user_", "_user", "-user", "user-"}
|
||||
invalidUsernames := []string{"_", ".", ".user", "appspace.", "appspace.user.extra", "user_", "_user", "-user", "user-", ",", ",user", "user,", "namespace,user"}
|
||||
|
||||
for _, username := range invalidUsernames {
|
||||
if isValidUsername(username) {
|
||||
|
||||
Reference in New Issue
Block a user