Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/482 supabase test framework #484

Merged
merged 10 commits into from
Aug 1, 2023

Conversation

johannesvedder
Copy link
Contributor

@johannesvedder johannesvedder commented Jul 17, 2023

  • Fixes docker networks misbehaving
  • Dumped study schema with postgres to verify it adheres to current version of supabase
  • Provides the ability to test (supabase) postgresql functions and row level security with pgtap
  • Requires the supabase CLI to be installed and can be initiated with npx supabase test db
  • For manual testing,database/studyu_schema.sql has to be copied to docker/supabase/seed.sql. I didn't find a way to specify a different file for seeding
  • depends on Bug: Study registry visibility issues #483

Todo:

@jannis-baum
Copy link
Contributor

How do we start the containers for local development now? The instructions in our contribution guide don't work anymore on this branch:

network studyu_network declared as external, but could not be found

@johannesvedder
Copy link
Contributor Author

How do we start the containers for local development now? The instructions in our contribution guide don't work anymore on this branch:

network studyu_network declared as external, but could not be found

I ran into some issues with the current setup, that's why I changed the network config for the time being. This is an open issue: docker/compose#10797
Depending on how the compose issue gets resolved, I will adapt our network setup accordingly. For now you can create the network yourself (docker network create).

jannis-baum
jannis-baum previously approved these changes Jul 20, 2023
Copy link
Contributor

@jannis-baum jannis-baum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can mention that people might have to create the network manually for the time being until the issue is fixed? Just so that nobody gets confused with more people getting on the project now.

docker/supabase/export_schema.sh Show resolved Hide resolved
@johannesvedder
Copy link
Contributor Author

johannesvedder commented Jul 20, 2023

Maybe we can mention that people might have to create the network manually for the time being until the issue is fixed? Just so that nobody gets confused with more people getting on the project now.

Yeah, I'll probably wait until progress happens with the compose issue and then do some changes on our side before merging this..

Edit: Let's just stay with our current setup for the moment and wait until the compose issue is closed.

@johannesvedder johannesvedder force-pushed the issue/482-supabase-test-framework branch from d627f50 to b6c032e Compare July 26, 2023 14:31
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 26, 2023
@johannesvedder johannesvedder force-pushed the issue/482-supabase-test-framework branch 5 times, most recently from e33a562 to 2359e90 Compare July 26, 2023 15:42
@johannesvedder
Copy link
Contributor Author

johannesvedder commented Jul 27, 2023

Update 27.07.

@johannesvedder johannesvedder force-pushed the issue/482-supabase-test-framework branch from 63100a4 to aa9dccb Compare July 27, 2023 06:40
jannis-baum
jannis-baum previously approved these changes Aug 1, 2023
Copy link
Contributor

@jannis-baum jannis-baum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! See 1 comment & we have to remember to also delete the supabase-test-framework-combined branch when it is no longer needed.

docker/load-test/k6 Outdated Show resolved Hide resolved
@johannesvedder
Copy link
Contributor Author

How do we start the containers for local development now? The instructions in our contribution guide don't work anymore on this branch:

network studyu_network declared as external, but could not be found

Do you still encounter this message with the current version @jannis-baum? Shouldn't be the case anymore

@johannesvedder johannesvedder linked an issue Aug 1, 2023 that may be closed by this pull request
@jannis-baum
Copy link
Contributor

Do you still encounter this message with the current version @jannis-baum? Shouldn't be the case anymore

No, works fine! :)

@johannesvedder johannesvedder merged commit 3b8bf71 into dev Aug 1, 2023
5 checks passed
@johannesvedder johannesvedder deleted the issue/482-supabase-test-framework branch August 1, 2023 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test: Create Supabase Test Framework
2 participants