Skip to content

Commit 2fe3e80

Browse files
committed
test: enhance test database isolation by including timestamp in DSN
1 parent eeec46f commit 2fe3e80

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ui/cli/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func setupTestDB(t *testing.T) {
5050
// Construct a unique in-memory DSN using the TempDir basename so each
5151
// test gets an isolated DB instance.
5252
tmpDir := t.TempDir()
53-
base := filepath.Base(tmpDir)
53+
base := fmt.Sprintf("%d_%s", time.Now().UnixNano(), filepath.Base(tmpDir))
5454
dsn := fmt.Sprintf("file:%s_keymaster_test?mode=memory&cache=shared", base)
5555

5656
viper.Set("database.type", "sqlite")

0 commit comments

Comments
 (0)