Skip to content

Commit 33dbd92

Browse files
committed
linting
1 parent 685b21e commit 33dbd92

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

coderd/database/dbtestutil/tx.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import (
44
"sync"
55
"testing"
66

7+
"github.com/stretchr/testify/assert"
8+
"golang.org/x/xerrors"
9+
710
"github.com/coder/coder/v2/coderd/database"
811
)
912

@@ -44,7 +47,7 @@ func StartTx(t *testing.T, db database.Store, opts *database.TxOptions) *DBTx {
4447
if count > 1 {
4548
// If you recursively call InTx, then don't use this.
4649
t.Logf("InTx called more than once: %d", count)
47-
t.Fatal("InTx called more than once, this is not allowed with the StartTx helper")
50+
assert.NoError(t, xerrors.New("InTx called more than once, this is not allowed with the StartTx helper"))
4851
}
4952

5053
<-done

enterprise/coderd/workspacequota_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -886,9 +886,3 @@ func (c *committer) UpdateWorkspaceBuildCostByID(ctx context.Context, t *testing
886886
func (c *committer) Done() error {
887887
return c.DBTx.Done()
888888
}
889-
890-
func noReturn[T any](f func(context.Context, *testing.T) T) func(context.Context, *testing.T) {
891-
return func(ctx context.Context, t *testing.T) {
892-
f(ctx, t)
893-
}
894-
}

0 commit comments

Comments
 (0)