mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
Merge pull request #5215 from Dokploy/fix/traefik-config-test-typecheck
fix: typecheck errors in traefik config test
This commit is contained in:
commit
a4e29172f4
@ -60,7 +60,12 @@ describe("writeAppTraefikConfig", () => {
|
||||
await writeAppTraefikConfig(
|
||||
{
|
||||
http: {
|
||||
routers: { [`${appName}-router-1`]: { rule: "Host(`x`)" } },
|
||||
routers: {
|
||||
[`${appName}-router-1`]: {
|
||||
rule: "Host(`x`)",
|
||||
service: `${appName}-service`,
|
||||
},
|
||||
},
|
||||
services: {},
|
||||
},
|
||||
},
|
||||
@ -80,7 +85,7 @@ describe("writeAppTraefikConfig", () => {
|
||||
);
|
||||
|
||||
expect(mocks.execAsyncRemote).toHaveBeenCalledOnce();
|
||||
const [, command] = mocks.execAsyncRemote.mock.calls[0];
|
||||
const [, command] = mocks.execAsyncRemote.mock.calls[0] ?? [];
|
||||
expect(command).toMatch(/^rm -f /);
|
||||
expect(command).toContain("no-domain-app.yml");
|
||||
});
|
||||
@ -91,7 +96,12 @@ describe("writeAppTraefikConfig", () => {
|
||||
await writeAppTraefikConfig(
|
||||
{
|
||||
http: {
|
||||
routers: { "with-domain-app-router-1": { rule: "Host(`x`)" } },
|
||||
routers: {
|
||||
"with-domain-app-router-1": {
|
||||
rule: "Host(`x`)",
|
||||
service: "with-domain-app-service",
|
||||
},
|
||||
},
|
||||
services: {},
|
||||
},
|
||||
},
|
||||
@ -100,7 +110,7 @@ describe("writeAppTraefikConfig", () => {
|
||||
);
|
||||
|
||||
expect(mocks.execAsyncRemote).toHaveBeenCalledOnce();
|
||||
const [, command] = mocks.execAsyncRemote.mock.calls[0];
|
||||
const [, command] = mocks.execAsyncRemote.mock.calls[0] ?? [];
|
||||
expect(command).toMatch(/^echo /);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user