refac: missing mutation tests, spa specs, checks shown to pass, touch targets, catalogue entry, production code
This commit is contained in:
1 parent
7c15206170
commit
3e02e14da4
48 files changed
+2173
-83
No files matched your search
@@ -5,11 +5,9 @@ import (
|
||||
"RenewCMS/internal/infrastructure/persistence/database"
|
||||
persistence "RenewCMS/internal/infrastructure/persistence/repositories"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -18,12 +16,9 @@ import (
|
||||
"gorm.io/gorm/logger"
|
||||
)
|
||||
|
||||
var activityDatabaseCounter atomic.Int64
|
||||
|
||||
func openActivityDatabase(t *testing.T) *gorm.DB {
|
||||
t.Helper()
|
||||
name := fmt.Sprintf("file:activity%d?mode=memory&cache=shared", activityDatabaseCounter.Add(1))
|
||||
db, err := gorm.Open(sqlite.Open(name), &gorm.Config{Logger: logger.Discard})
|
||||
db, err := gorm.Open(sqlite.Open(uniqueMemoryDSN()), &gorm.Config{Logger: logger.Discard})
|
||||
if err != nil {
|
||||
t.Fatalf("failed to open the in-memory database: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user