Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions scaletest/createworkspaces/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ func (c UserConfig) Validate() error {
if c.OrganizationID == uuid.Nil {
return xerrors.New("organization_id must not be a nil UUID")
}
if c.Username == "" {
return xerrors.New("username must be set")
}
if c.Email == "" {
return xerrors.New("email must be set")
if c.SessionToken == "" {
if c.Username == "" {
return xerrors.New("username must be set")
}
if c.Email == "" {
return xerrors.New("email must be set")
}
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion scaletest/createworkspaces/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (r *Runner) Run(ctx context.Context, id string, logs io.Writer) error {

_, _ = fmt.Fprintln(logs, "Creating user:")

user, err := r.client.CreateUser(ctx, codersdk.CreateUserRequest{
user, err = r.client.CreateUser(ctx, codersdk.CreateUserRequest{
OrganizationID: r.cfg.User.OrganizationID,
Username: r.cfg.User.Username,
Email: r.cfg.User.Email,
Expand Down