chore: Rename databasefake --> dbfake (#6011)

This commit is contained in:
Steven Masley
2023-02-02 19:28:55 -06:00
committed by GitHub
parent f60f06e2c6
commit 8b424f03c2
29 changed files with 152 additions and 152 deletions

View File

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/coderd/database/databasefake"
"github.com/coder/coder/coderd/database/dbfake"
"github.com/coder/coder/coderd/database/dbgen"
"github.com/coder/coder/testutil"
)
@ -30,7 +30,7 @@ func TestAPIKeyEncryption(t *testing.T) {
t.Run("OK", func(t *testing.T) {
t.Parallel()
db := databasefake.New()
db := dbfake.New()
keyID, _, hashedSecret, data := generateAPIKey(t, db)
encrypted, err := encryptAPIKey(data)
@ -51,7 +51,7 @@ func TestAPIKeyEncryption(t *testing.T) {
t.Run("Expiry", func(t *testing.T) {
t.Parallel()
db := databasefake.New()
db := dbfake.New()
_, _, _, data := generateAPIKey(t, db)
data.ExpiresAt = database.Now().Add(-1 * time.Hour)
@ -68,7 +68,7 @@ func TestAPIKeyEncryption(t *testing.T) {
t.Run("KeyMatches", func(t *testing.T) {
t.Parallel()
db := databasefake.New()
db := dbfake.New()
hashedSecret := sha256.Sum256([]byte("wrong"))
// Insert a token with a mismatched hashed secret.