Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/dokploy/__test__/deploy/application.real.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ vi.mock("@dokploy/server/db", () => {
applications: {
findFirst: vi.fn(),
},
// build-policy reads this on the deploy path, through
// planApplicationBuild -> resolveBuildPolicy ->
// previewBuildPolicyDecision -> findBuildPolicySettings
// (services/build-policy/settings.ts:18). Without it the
// namespace is undefined and every test here throws
// "Cannot read properties of undefined (reading 'findFirst')".
// Resolving undefined is the policy-off answer, which is what
// these upstream-behaviour tests want.
buildPolicySettings: {
findFirst: vi.fn(),
},
deployHook: {
findFirst: vi.fn(),
},
Expand Down