style(test): format gateway auth token coverage

This commit is contained in:
Peter Steinberger
2026-03-07 18:33:25 +00:00
parent 10d0e3f3ca
commit fbb9bb08c5

View File

@@ -181,18 +181,21 @@ describe("shouldRequireGatewayTokenForInstall", () => {
});
it("requires token in inferred mode when password env exists only in shell", async () => {
await withEnvAsync({ [envVar("OPENCLAW", "GATEWAY", "PASSWORD")]: "password-from-env" }, async () => {
// pragma: allowlist secret
const required = shouldRequireGatewayTokenForInstall(
{
gateway: {
auth: {},
},
} as OpenClawConfig,
process.env,
);
expect(required).toBe(true);
});
await withEnvAsync(
{ [envVar("OPENCLAW", "GATEWAY", "PASSWORD")]: "password-from-env" },
async () => {
// pragma: allowlist secret
const required = shouldRequireGatewayTokenForInstall(
{
gateway: {
auth: {},
},
} as OpenClawConfig,
process.env,
);
expect(required).toBe(true);
},
);
});
it("does not require token in inferred mode when password is configured", () => {