testcontainers-dotnet icon indicating copy to clipboard operation
testcontainers-dotnet copied to clipboard

Add SQLite package

Open hishamco opened this issue 1 year ago • 5 comments

Problem

Lack to support SQLite database OOB

Solution

Introducing Testcontainers.Sqlite package

Benefit

Allow devs to use SQLite

Alternatives

Nothing

Would you like to help contributing this enhancement?

Yes

hishamco avatar Apr 22 '24 03:04 hishamco

Could you please elaborate on what are the advantages of using a Docker container over directly using one of the many available SQLite libraries such as Microsoft.Data.Sqlite, SQLite-net or System.Data.SQLite?

0xced avatar Apr 22 '24 10:04 0xced

I working on an OSS project I just find myself need a docker image for integration testing. I know I can manage it myself by creating a .db but I need to cleanup everything after the testing

hishamco avatar Apr 22 '24 10:04 hishamco

Couldn't you use the generic container builder? We could add a section to our documentation covering common builder patterns, similar to an article or how-to guide. I am uncertain whether we require modules for all kinds of "simple" configurations.

Is there even a container image available? How would you access the database from remote? Looking forward to discussing this topic and hear your thoughts (since I would simply store the database in-memory and might miss something).

HofmeisterAn avatar Apr 22 '24 16:04 HofmeisterAn

Is there even a container image available?

https://hub.docker.com/r/keinos/sqlite3#!

(since I would simply store the database in-memory and might miss something).

This sometimes problematic especially in testing

hishamco avatar Apr 22 '24 20:04 hishamco

https://hub.docker.com/r/keinos/sqlite3#!

As I commented here, I do not think it hosts a database accessible remotely. According to the Docker Hub docs, they also mount the database file from the host. I am not sure how you are planning to implement a module, but I am curious to see the proof of concept.

HofmeisterAn avatar Apr 23 '24 04:04 HofmeisterAn

I will close this issue. As mentioned, I do not think the image is a hosted SQLite instance. If you have any further information, do not hesitate to reopen the issue.

HofmeisterAn avatar Jun 13 '24 16:06 HofmeisterAn