mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
style(test): format gateway auth token coverage
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user