Skip to content

feat: remove loadtest cmd, add new scaletest cmd #5310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fixup! Merge branch 'main' into dean/scaletest
  • Loading branch information
deansheather committed Dec 15, 2022
commit 03a5834615241d33dfd5aecc9a579dcc7d8f1e8d
1 change: 1 addition & 0 deletions cli/testdata/coder_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Commands:
port-forward Forward ports from machine to a workspace
publickey Output your Coder public key used for Git operations
reset-password Directly connect to the database to reset a user's password
scaletest Run a scale test against the Coder API
server Start a Coder server
state Manually manage Terraform state to fix broken workspaces
templates Manage templates
Expand Down
2 changes: 1 addition & 1 deletion coderd/database/databasefake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ func (q *fakeQuerier) GetUserByEmailOrUsername(_ context.Context, arg database.G
defer q.mutex.RUnlock()

for _, user := range q.users {
if strings.EqualFold(user.Email, arg.Email) || strings.EqualFold(user.Username, arg.Username) {
if !user.Deleted && (strings.EqualFold(user.Email, arg.Email) || strings.EqualFold(user.Username, arg.Username)) {
return user, nil
}
}
Expand Down
2 changes: 2 additions & 0 deletions coderd/database/querier.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions coderd/database/queries/users.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ SELECT
FROM
users
WHERE
LOWER(username) = LOWER(@username) OR LOWER(email) = LOWER(@email)
(LOWER(username) = LOWER(@username) OR LOWER(email) = LOWER(@email)) AND
deleted = false
LIMIT
1;

-- name: GetUserCount :one
SELECT
COUNT(*)
FROM
users WHERE deleted = false;
users
WHERE
deleted = false;

-- name: GetActiveUserCount :one
SELECT
Expand Down