I am trying to mock a database within my unit test...
# ktor
l
I am trying to mock a database within my unit test. This doesn't work currently because in my test I am using the
Copy code
withTestApplication({ module() })
inside the module it setup database with url does doesn't point anywhere.. I wanted to know if anyone had experience with this. I am hoping to keep this a mock and not an in memory database..
f
l
@Fi5t thanks.. someone suggested that before.. I was trying to keep things with mocks and not throwaway containers for my unit test.. so what I have done in the mean time is just used a secondary testModule() which doesn't include connection.. that works but seems like I should be doing something more impressive than that. But I will look into this for integration thanks once again for the suggestion.