GenerateUserIdentifier generates a username and email for scale testing. The username follows the pattern: scaletest- - The email follows the pattern: - @scaletest.local
(id string)
| 21 | // The username follows the pattern: scaletest-<random>-<id> |
| 22 | // The email follows the pattern: <random>-<id>@scaletest.local |
| 23 | func GenerateUserIdentifier(id string) (username, email string, err error) { |
| 24 | randStr, err := cryptorand.String(DefaultRandLength) |
| 25 | if err != nil { |
| 26 | return "", "", err |
| 27 | } |
| 28 | |
| 29 | username = fmt.Sprintf("%s-%s-%s", ScaleTestPrefix, randStr, id) |
| 30 | email = fmt.Sprintf("%s-%s%s", randStr, id, EmailDomain) |
| 31 | return username, email, nil |
| 32 | } |
| 33 | |
| 34 | // GenerateWorkspaceName generates a workspace name for scale testing. |
| 35 | // The workspace name follows the pattern: scaletest-<random>-<id> |
no test coverage detected