fix: make docker-test
work as described in Quickstart guide
#2041
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title
Fixed an issue where make docker-test failed when following the Quickstart guide.
What kind of change does this PR introduce?
make docker-test
in the Makefile so that Docker Compose is invoked correctly and-race
is removed whenCGO_ENABLED=0
.TestMaybeLoadUserOrSession
to prevent deep-equal comparison failures due to time zone differences.Dockerfile.dev
to prevent “dubious ownership” errors inside the container.What is the current behavior?
make docker-test
failsmake docker-test
, users see an error.-race
underCGO_ENABLED=0
. As a result, the test container never starts and tests cannot run.TestMaybeLoadUserOrSession
fails intermittentlyValid_Session_ID_Claim
sub-test inAuthTestSuite
blows up with a “Not equal” error because theCreatedAt
/UpdatedAt
fields are in UTC, while the expected session usestime.Local
.Git “dubious ownership” error inside container
What is the new behavior?
make docker-test
now works correctlydocker-test
has been updated to:-race
flag.TestMaybeLoadUserOrSession
is now stablets.API.db.Load(s)
, the test convertss.CreatedAt
ands.UpdatedAt
to UTC:Git Safe Directory configuration added
Dockerfile.dev
, we now run:RUN git config --global --add safe.directory /go/src/github.com/supabase/auth
git checkout
,git pull
) without ownership issues.Additional context
These configuration instructions have also been added to
CONTRIBUTING.md
to ensure future contributors can rundocker-test
reliably in a local Docker environment.