ci: Run tests using PostgreSQL database and mock (#49)

* ci: Run tests using PostgreSQL database and mock

This allows us to use the mock database for quick iterative testing,
and have confidence from CI using a real PostgreSQL database.

PostgreSQL tests are only ran on Linux. They are *really* slow on MacOS
and Windows runners, and don't provide much additional confidence.

* Only run PostgreSQL tests once for speed

* Fix race condition of log after close

Not all resources were cleaned up immediately after a peer connection was
closed. DataChannels could have a goroutine exit after Close() prior to this.

* Fix comment
This commit is contained in:
Kyle Carberry
2022-01-22 15:58:26 -06:00
committed by GitHub
parent dfddaf10a2
commit 50d8151995
6 changed files with 43 additions and 8 deletions

View File

@ -86,13 +86,14 @@ INSERT INTO
email,
name,
login_type,
revoked,
hashed_password,
created_at,
updated_at,
username
)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8) RETURNING *;
($1, $2, $3, $4, false, $5, $6, $7, $8) RETURNING *;
-- name: UpdateAPIKeyByID :exec
UPDATE

View File

@ -243,13 +243,14 @@ INSERT INTO
email,
name,
login_type,
revoked,
hashed_password,
created_at,
updated_at,
username
)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8) RETURNING id, email, name, revoked, login_type, hashed_password, created_at, updated_at, temporary_password, avatar_hash, ssh_key_regenerated_at, username, dotfiles_git_uri, roles, status, relatime, gpg_key_regenerated_at, _decomissioned, shell
($1, $2, $3, $4, false, $5, $6, $7, $8) RETURNING id, email, name, revoked, login_type, hashed_password, created_at, updated_at, temporary_password, avatar_hash, ssh_key_regenerated_at, username, dotfiles_git_uri, roles, status, relatime, gpg_key_regenerated_at, _decomissioned, shell
`
type InsertUserParams struct {