Skip to content

V3UpdaterTest not running as expected due to un-answered mocks #1612

@andrew-m-leonard

Description

@andrew-m-leonard

Describe the bug
V3UpdaterTest.kt test: "new update works", and also "exit is called when db not present" are failing with several MockKException: no answer found, eg:

2025-09-10 15:32:46,435 [io.moc.imp.rec.sta.AnsweringState] (main @coroutine#1010) Throwing io.mockk.MockKException: no answer found for APIDataStore(#172).loadDataFromDb(true, false) among the configured answers: (APIDataStore(#172).isConnectedToDb(any()))) on APIDataStore(#172).loadDataFromDb(true, false)
2025-09-10 15:32:46,435 [net.ado.api.v3.V3Updater$Companion] (main @coroutine#891) Failed to perform full update: io.mockk.MockKException: no answer found for APIDataStore(#172).loadDataFromDb(true, false) among the configured answers: (APIDataStore(#172).isConnectedToDb(any())))

"new update works" is actually just returning the same instance of repo as the assert just does ==, I have added a !== reference assert to ensure it really works, and disabled the test for now.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions