chore(db): schema.go searches three levels up — replaces the tests-dir symlink
Release / build-and-push (push) Successful in 3m8s
Release / build-and-push (push) Successful in 3m8s
Host-side test runs use CWD=cmd/server/tests, three levels below the repo root; the location search only went up two, so it never found database/schema/schema.sql from there and init() fatal-exited. That gap was being papered over by an untracked local symlink (cmd/server/tests/database -> ../../../database) hidden behind a bare `database` line in .git/info/exclude — which also broke `git add` under database/. Fix the search list instead and drop the filesystem trick: no symlink to commit, no exclude hack, works on any platform. Verified: contract pins green from cmd/server/tests with no symlink present (init resolves via the new entry); parse test green.
This commit is contained in:
1 parent
0799cca3e6
commit
4f913da0b1
1 file changed
+3
@@ -25,6 +25,9 @@ func init() {
|
|||||||
"/app/database/schema/schema.sql",
|
"/app/database/schema/schema.sql",
|
||||||
"../database/schema/schema.sql",
|
"../database/schema/schema.sql",
|
||||||
"../../database/schema/schema.sql",
|
"../../database/schema/schema.sql",
|
||||||
|
// Integration tests run with CWD=cmd/server/tests, three levels
|
||||||
|
// below the repo root — two up only reaches cmd/.
|
||||||
|
"../../../database/schema/schema.sql",
|
||||||
}
|
}
|
||||||
|
|
||||||
var content []byte
|
var content []byte
|
||||||
|
|||||||
Reference in new issue
Block a user