mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
* chore: add /v2 to import module path go mod requires semantic versioning with versions greater than 1.x This was a mechanical update by running: ``` go install github.com/marwan-at-work/mod/cmd/mod@latest mod upgrade ``` Migrate generated files to import /v2 * Fix gen
27 lines
526 B
Go
27 lines
526 B
Go
package dbpurge_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"go.uber.org/goleak"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"cdr.dev/slog/sloggers/slogtest"
|
|
"github.com/coder/coder/v2/coderd/database/dbfake"
|
|
"github.com/coder/coder/v2/coderd/database/dbpurge"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
goleak.VerifyTestMain(m)
|
|
}
|
|
|
|
// Ensures no goroutines leak.
|
|
func TestPurge(t *testing.T) {
|
|
t.Parallel()
|
|
purger := dbpurge.New(context.Background(), slogtest.Make(t, nil), dbfake.New())
|
|
err := purger.Close()
|
|
require.NoError(t, err)
|
|
}
|