mirror of https://github.com/coder/coder.git
fix(scaletest): correctly validate configs using `SessionToken` (#7111)
This commit is contained in:
parent
f517724caa
commit
17f692a89a
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue