GenerateWorkspaceName generates a workspace name for scale testing. The workspace name follows the pattern: scaletest- -
(id string)
| 34 | // GenerateWorkspaceName generates a workspace name for scale testing. |
| 35 | // The workspace name follows the pattern: scaletest-<random>-<id> |
| 36 | func GenerateWorkspaceName(id string) (name string, err error) { |
| 37 | randStr, err := cryptorand.String(DefaultRandLength) |
| 38 | if err != nil { |
| 39 | return "", err |
| 40 | } |
| 41 | |
| 42 | return fmt.Sprintf("%s-%s-%s", ScaleTestPrefix, randStr, id), nil |
| 43 | } |
| 44 | |
| 45 | // GenerateDeterministicWorkspaceName generates a deterministic workspace name |
| 46 | // for scale testing without a random component. This is useful when the |
no test coverage detected