You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm willing to help fix the problem and contribute a pull request
Describe the bug
Testing the package, returns a failed test for TestCollectionDAOFindOrCreate in ./internal/adapter/sqlite/collection_dao_test.go.
But running the test manually, as well as all others in the test stack trace pass.
--- FAIL: TestCollectionDAOFindOrCreate (0.00s)
assert.go:27: Expected `failed to migrate the database: database migration failed: no such module: fts5` (type *fmt.wrapError) to be nil
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x100ccade8]
goroutine 19 [running]:
testing.tRunner.func1.2({0x100e78ce0, 0x10106c5a0})
/opt/homebrew/Cellar/go/1.21.5/libexec/src/testing/testing.go:1545 +0x1c4
testing.tRunner.func1()
/opt/homebrew/Cellar/go/1.21.5/libexec/src/testing/testing.go:1548 +0x360
panic({0x100e78ce0?, 0x10106c5a0?})
/opt/homebrew/Cellar/go/1.21.5/libexec/src/runtime/panic.go:914 +0x218
github.com/mickael-menu/zk/internal/adapter/sqlite.testDBWithFixtures(0x1400005ceb8?, {0x100adedbc?})
/Users/tjex/.local/src/zk-org/zk.git/fix-collectionDAO-test/internal/adapter/sqlite/transaction_test.go:23 +0x58
github.com/mickael-menu/zk/internal/adapter/sqlite.testTransactionWithFixtures(0x1400005cf18?, {0x100af1960?}, 0x140001e7f18)
/Users/tjex/.local/src/zk-org/zk.git/fix-collectionDAO-test/internal/adapter/sqlite/transaction_test.go:46 +0x24
github.com/mickael-menu/zk/internal/adapter/sqlite.testTransaction(...)
/Users/tjex/.local/src/zk-org/zk.git/fix-collectionDAO-test/internal/adapter/sqlite/transaction_test.go:40
github.com/mickael-menu/zk/internal/adapter/sqlite.testCollectionDAO(0xed65ed000000000?, 0x6597c942?)
/Users/tjex/.local/src/zk-org/zk.git/fix-collectionDAO-test/internal/adapter/sqlite/collection_dao_test.go:121 +0x4c
github.com/mickael-menu/zk/internal/adapter/sqlite.TestCollectionDAOFindOrCreate(0x0?)
/Users/tjex/.local/src/zk-org/zk.git/fix-collectionDAO-test/internal/adapter/sqlite/collection_dao_test.go:12 +0x34
testing.tRunner(0x14000185040, 0x100ebe130)
/opt/homebrew/Cellar/go/1.21.5/libexec/src/testing/testing.go:1595 +0xe8
created by testing.(*T).Run in goroutine 1
/opt/homebrew/Cellar/go/1.21.5/libexec/src/testing/testing.go:1648 +0x33c
FAIL github.com/mickael-menu/zk/internal/adapter/sqlite 0.010s
How to reproduce?
run go test ./internal/adapter/sqlite from root of current main branch, commit 50fb638.
Could be because the function FindOrCreate wants to operate on a collection, so just running a test without a db may be what's returning the nil pointer?
The text was updated successfully, but these errors were encountered:
Check if applicable
Describe the bug
Testing the package, returns a failed test for
TestCollectionDAOFindOrCreate
in./internal/adapter/sqlite/collection_dao_test.go
.But running the test manually, as well as all others in the test stack trace pass.
How to reproduce?
run
go test ./internal/adapter/sqlite
from root of current main branch, commit 50fb638.Could be because the function
FindOrCreate
wants to operate on a collection, so just running a test without a db may be what's returning the nil pointer?The text was updated successfully, but these errors were encountered: