Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ca5519

Browse files
authored
chore(coderd/idpsync): run all tests with postgres (coder#18149)
Related to coder#15109. Running postgres tests used to create a new postgres docker container every time. I believe the slow down might've been caused by that and was misattributed to postgres performance. ``` coder@main ~/coder ((0e90ac29))> DB=ci gotestsum --packages="./coderd/idpsync" -- -count=1 ✓ coderd/idpsync (1.471s) DONE 91 tests in 4.766s ```
1 parent bdf227c commit 8ca5519

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

coderd/idpsync/group_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ func TestParseGroupClaims(t *testing.T) {
6969
func TestGroupSyncTable(t *testing.T) {
7070
t.Parallel()
7171

72-
// Last checked, takes 30s with postgres on a fast machine.
73-
if dbtestutil.WillUsePostgres() {
74-
t.Skip("Skipping test because it populates a lot of db entries, which is slow on postgres.")
75-
}
76-
7772
userClaims := jwt.MapClaims{
7873
"groups": []string{
7974
"foo", "bar", "baz",
@@ -379,10 +374,6 @@ func TestGroupSyncTable(t *testing.T) {
379374
func TestSyncDisabled(t *testing.T) {
380375
t.Parallel()
381376

382-
if dbtestutil.WillUsePostgres() {
383-
t.Skip("Skipping test because it populates a lot of db entries, which is slow on postgres.")
384-
}
385-
386377
db, _ := dbtestutil.NewDB(t)
387378
manager := runtimeconfig.NewManager()
388379
s := idpsync.NewAGPLSync(slogtest.Make(t, &slogtest.Options{}),

coderd/idpsync/role_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ import (
2727
func TestRoleSyncTable(t *testing.T) {
2828
t.Parallel()
2929

30-
if dbtestutil.WillUsePostgres() {
31-
t.Skip("Skipping test because it populates a lot of db entries, which is slow on postgres.")
32-
}
33-
3430
userClaims := jwt.MapClaims{
3531
"roles": []string{
3632
"foo", "bar", "baz",

0 commit comments

Comments
 (0)