Open tschuehly opened 11 months ago
Hey hey!
I have not! Do you think I should? You mean to use the seeding on top of the setup I described to feed data into the database correct?
I also haven't tried authentication yet, so I haven't looked into mocking GoTrue. Nice to see it's less intensive than the setup I show there.
There is a part 2 to my article btw, where I run the complete Supabase setup locally, because I realize they actually provide a Docker compose image. I'm guessing that it could be used for testing as well, by keeping it up in the air https://lengrand.fr/unit-testing-supabase-in-kotlin-using-test-containers-part-2/
Take care!
On Thu, Nov 30, 2023 at 10:56 PM Thomas Schühly @.***> wrote:
HelIo 👋
I found your article on foojay and was really interested in it as I'm also developing a supabase library and using it for my SaaS side business. https://github.com/tschuehly/htmx-spring-supabase-auth
Did you try to use the supabase cli to start a supabase setup with docker in docker using Testcontainers? https://supabase.com/docs/guides/cli/seeding-your-database
I'm currently using the GoTrue mock from the supabase-kt library: https://github.com/tschuehly/htmx-spring-supabase-auth/blob/0.3.0-SNAPSHOT/src/test/kotlin/de/tschuehly/htmx/spring/supabase/auth/test/mock/GoTrueMock.kt
Greetings Thomas
— Reply to this email directly, view it on GitHub https://github.com/jlengrand/supabase-mock-demo-kotlin/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHBAQU6A6JNORORLAYPLULYHD6HXAVCNFSM6AAAAABAB4INC2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTSNJXGQZDSOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
What I meant was creating a custom image based on docker:dind, that has the supabase cli installed.
On startup it runs supabase start
, and can be seeded with a seed.sql that is provided.
This way you would only need one TestContainers configuration.
HelIo 👋
I found your article on foojay and was really interested in it as I'm also developing a supabase library and using it for my SaaS side business. https://github.com/tschuehly/htmx-spring-supabase-auth
Did you try to use the supabase cli to start a supabase setup with docker in docker using Testcontainers? https://supabase.com/docs/guides/cli/seeding-your-database
I'm currently using the GoTrue mock from the supabase-kt library: https://github.com/tschuehly/htmx-spring-supabase-auth/blob/0.3.0-SNAPSHOT/src/test/kotlin/de/tschuehly/htmx/spring/supabase/auth/test/mock/GoTrueMock.kt
Greetings Thomas