Files
coder/scaletest/createusers/config.go
T
Ethan d02ff5f9b2 refactor(scaletest): add runner for creating users (#19811)
Closes https://github.com/coder/internal/issues/985

Simple refactor of the user creation logic into it's own test runner. This lets us create users independently of workspaces, for use in a bunch of load generators, including the Coder Connect load generator.

This PR creates the new runner, and has the existing `createworkspaces` runner use it.
2025-09-22 17:35:36 +10:00

24 lines
568 B
Go

package createusers
import (
"github.com/google/uuid"
"golang.org/x/xerrors"
)
type Config struct {
// OrganizationID is the ID of the organization to add the user to.
OrganizationID uuid.UUID `json:"organization_id"`
// Username is the username of the new user. Generated if empty.
Username string `json:"username"`
// Email is the email of the new user. Generated if empty.
Email string `json:"email"`
}
func (c Config) Validate() error {
if c.OrganizationID == uuid.Nil {
return xerrors.New("organization_id must not be a nil UUID")
}
return nil
}