mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-23 16:15:21 +02:00
test: enhance application tests with patch mock and additional paths
- Added a mock for the patch table in application.command.test.ts to simulate findMany behavior. - Updated application.real.test.ts to include new paths for COMPOSE_PATH, SSH_PATH, and BASE_PATH for improved test coverage.
This commit is contained in:
@@ -28,6 +28,9 @@ vi.mock("@dokploy/server/db", () => {
|
||||
applications: {
|
||||
findFirst: vi.fn(),
|
||||
},
|
||||
patch: {
|
||||
findMany: vi.fn().mockResolvedValue([]),
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -13,7 +13,10 @@ vi.mock("@dokploy/server/constants", () => ({
|
||||
paths: () => ({
|
||||
LOGS_PATH: "/tmp/dokploy-test-real/logs",
|
||||
APPLICATIONS_PATH: "/tmp/dokploy-test-real/applications",
|
||||
COMPOSE_PATH: "/tmp/dokploy-test-real/compose",
|
||||
SSH_PATH: "/tmp/dokploy-test-real/ssh",
|
||||
PATCH_REPOS_PATH: "/tmp/dokploy-test-real/patch-repos",
|
||||
BASE_PATH: "/tmp/dokploy-test-real",
|
||||
}),
|
||||
IS_CLOUD: false,
|
||||
docker: {},
|
||||
|
||||
Reference in New Issue
Block a user