Merge pull request #5215 from Dokploy/fix/traefik-config-test-typecheck

fix: typecheck errors in traefik config test
This commit is contained in:
Mauricio Siu 2026-08-28 16:47:45 -06:00 committed by GitHub
commit a4e29172f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 /);
});
});