chore: rename dbfake to dbmem (#10432)

This commit is contained in:
Kyle Carberry
2023-10-30 17:42:20 +00:00
committed by GitHub
parent 7a8da08124
commit 5abfe5afd0
42 changed files with 215 additions and 215 deletions
@@ -10,8 +10,8 @@ import (
"golang.org/x/oauth2"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/dbfake"
"github.com/coder/coder/v2/coderd/database/dbgen"
"github.com/coder/coder/v2/coderd/database/dbmem"
"github.com/coder/coder/v2/coderd/database/dbtime"
"github.com/coder/coder/v2/testutil"
)
@@ -21,14 +21,14 @@ func TestObtainOIDCAccessToken(t *testing.T) {
ctx := context.Background()
t.Run("NoToken", func(t *testing.T) {
t.Parallel()
db := dbfake.New()
db := dbmem.New()
_, err := obtainOIDCAccessToken(ctx, db, nil, uuid.Nil)
require.NoError(t, err)
})
t.Run("InvalidConfig", func(t *testing.T) {
// We still want OIDC to succeed even if exchanging the token fails.
t.Parallel()
db := dbfake.New()
db := dbmem.New()
user := dbgen.User(t, db, database.User{})
dbgen.UserLink(t, db, database.UserLink{
UserID: user.ID,
@@ -40,7 +40,7 @@ func TestObtainOIDCAccessToken(t *testing.T) {
})
t.Run("Exchange", func(t *testing.T) {
t.Parallel()
db := dbfake.New()
db := dbmem.New()
user := dbgen.User(t, db, database.User{})
dbgen.UserLink(t, db, database.UserLink{
UserID: user.ID,