Skip to content

Integration test suggestion? #603

Answered by ganigeorgiev
jcyh0120 asked this question in Q&A
Discussion options

You must be logged in to vote

Hm, complete integration testing with an external backend is difficult to do. PocketBase provides some test helpers, but they are useful only when you embed PocketBase in your Go app - https://pocketbase.io/docs/testing/.

You can't start PocketBase with in memory sqlite, but even if that was possible you still will not have a separate db while running the same PocketBase instance. For full integration tests, you'll need not only the database but the file storage abstraction and therefore it may be easier to just start PocketBase with an entire test_pb_data directory:

./pocketbase serve --dir="/path/to/test_pb_data/"

The internal integration tests uses similar approach, but since we have a…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jcyh0120
Comment options

@parkernilson
Comment options

@ErtanTaner
Comment options

Answer selected by jcyh0120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants