Commit 0a02076
fix(db): support arbitrary test directories (#4590)
* fix(db test): resolve absolute paths before computing relative path
when running supabase db test from a docker-outside-of-docker environment,
test file paths may be absolute host paths while utils.DbTestsDir is relative.
filepath.Rel fails when the base path is relative and the target is absolute.
this change converts both paths to absolute before computing the relative path,
which handles all path combinations correctly: relative+relative, absolute+absolute,
and mixed scenarios like docker-outside-of-docker.
closes #3194
* fix: support arbitrary test directories
* chore: unset container working dir
* chore: refactor bind mount
---------
Co-authored-by: Han Qiao <sweatybridge@gmail.com>1 parent ac1c59a commit 0a02076
1 file changed
Lines changed: 11 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| |||
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
90 | | - | |
91 | | - | |
| 88 | + | |
92 | 89 | | |
93 | 90 | | |
94 | 91 | | |
| |||
0 commit comments