mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
fix: make gateway token recovery usable from macOS onboarding (#118051)
* fix(gateway): add safe token recovery Co-authored-by: 宇宙熊Yzx <53250620+849261680@users.noreply.github.com> * chore: move gateway release note to PR * test(cli): classify gateway token output --------- Co-authored-by: 宇宙熊Yzx <53250620+849261680@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e47f9ba075
commit
ad53d4419e
@@ -1277,6 +1277,24 @@ describe("config cli", () => {
|
||||
expect(mockWriteStdout).toHaveBeenCalledWith("__OPENCLAW_REDACTED__\n");
|
||||
});
|
||||
|
||||
it("redacts sensitive values in JSON output", async () => {
|
||||
const resolved: OpenClawConfig = {
|
||||
gateway: {
|
||||
auth: {
|
||||
token: "super-secret-token",
|
||||
},
|
||||
},
|
||||
};
|
||||
setSnapshot(resolved, resolved);
|
||||
|
||||
await runConfigCommand(["config", "get", "gateway.auth.token", "--json"]);
|
||||
|
||||
expect(parseLastLogPayload()).toBe("__OPENCLAW_REDACTED__");
|
||||
expect(mockWriteStdout).not.toHaveBeenCalledWith(
|
||||
expect.stringContaining("super-secret-token"),
|
||||
);
|
||||
});
|
||||
|
||||
it("prints materialized subagent archive default", async () => {
|
||||
const resolved: OpenClawConfig = {};
|
||||
const config: OpenClawConfig = {
|
||||
|
||||
Reference in New Issue
Block a user