Skip to content

Commit 05ea920

Browse files
mpywclaude
andcommitted
fix: use correct SQLite DSN format to prevent file creation
- Change `sqlite::memory:` to `:memory:` in all test configs - Add special handling in Driver() for SQLite DSNs without scheme (:memory:, .db, .sqlite files) The previous `sqlite::memory:` format was being interpreted as a file path by the SQLite driver, causing unwanted file creation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 87305d9 commit 05ea920

59 files changed

Lines changed: 69 additions & 64 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SCHEMA.md

Lines changed: 2 additions & 2 deletions

e2e/content_type_default_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
dsn: "sqlite::memory:"
2+
dsn: ":memory:"
33

44
mutations:
55
- type: one

e2e/content_type_form_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
dsn: "sqlite::memory:"
2+
dsn: ":memory:"
33

44
mutations:
55
- type: one

e2e/content_type_json_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
dsn: "sqlite::memory:"
2+
dsn: ":memory:"
33

44
mutations:
55
- type: one

e2e/database_init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestDatabaseInit_SQLFile(t *testing.T) {
7171
configFile := filepath.Join(tmpDir, "config.yaml")
7272
err = os.WriteFile(configFile, []byte(`
7373
database:
74-
dsn: "sqlite::memory:"
74+
dsn: ":memory:"
7575
init:
7676
sql_files:
7777
- ./init.sql

e2e/database_init_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
dsn: "sqlite::memory:"
2+
dsn: ":memory:"
33
init: |
44
CREATE TABLE IF NOT EXISTS products (
55
id INTEGER PRIMARY KEY,

e2e/empty_body_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
dsn: "sqlite::memory:"
2+
dsn: ":memory:"
33
init: |
44
CREATE TABLE IF NOT EXISTS resources (
55
id INTEGER PRIMARY KEY AUTOINCREMENT,

e2e/invalid_csv_with_one_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
dsn: "sqlite::memory:"
2+
dsn: ":memory:"
33

44
queries:
55
- type: one

e2e/invalid_each_with_one_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
dsn: "sqlite::memory:"
2+
dsn: ":memory:"
33

44
queries:
55
- type: one

e2e/invalid_handle_not_found_with_many_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
dsn: "sqlite::memory:"
2+
dsn: ":memory:"
33

44
queries:
55
- type: many

0 commit comments

Comments
 (0)