This commit is contained in:
Jón Levy 2026-09-13 12:08:44 +00:00 committed by GitHub
commit 4fcab3e993
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -1023,7 +1023,7 @@ describe("evaluateCodexCredentialReadiness", () => {
const alpha = await fs.readFile(path.join(alphaHome, "config.toml"), "utf8");
const zero = await fs.readFile(path.join(zeroHome, "config.toml"), "utf8");
expect(alpha).toContain('[mcp_servers."alpha"]');
expect(alpha).toContain('Authorization = "Bearer alpha-token"');
expect(alpha).toContain('http_headers = { Authorization = "Bearer alpha-token" }');
expect(zero).not.toContain("mcp_servers.");
expect(zero).not.toContain("stale-token");
expect(alphaHome).not.toBe(zeroHome);
@ -1154,7 +1154,7 @@ describe("stageCodexHomeForSync", () => {
// and is persisted 0600 on disk.
await fs.writeFile(
path.join(home, "config.toml"),
"[mcp_servers.paperclip]\nheaders = { Authorization = \"Bearer secret-token\" }\n",
"[mcp_servers.paperclip]\nhttp_headers = { Authorization = \"Bearer secret-token\" }\n",
{ mode: 0o600 },
);
staged = await stageCodexHomeForSync(home, { runId: "run-toml-mode" });

View File

@ -316,7 +316,7 @@ function buildManagedMcpBlock(input: {
"",
`[mcp_servers.${tomlString(managedName)}]`,
`url = ${tomlString(url)}`,
`headers = { Authorization = ${tomlString(`Bearer ${gateway.bearerToken}`)} }`,
`http_headers = { Authorization = ${tomlString(`Bearer ${gateway.bearerToken}`)} }`,
);
});
lines.push(MANAGED_MCP_BLOCK_END);

View File

@ -313,7 +313,7 @@ describe("codex execute", () => {
expect(configText).toContain("[mcp_servers.github]");
expect(configText).toContain("[mcp_servers.\"paperclip-github\"]");
expect(configText).toContain('url = "http://paperclip.local:3100/api/tool-gateway/gateways/gateway-1/mcp"');
expect(configText).toContain('Authorization = "Bearer pcgw_secret-managed-token"');
expect(configText).toContain('http_headers = { Authorization = "Bearer pcgw_secret-managed-token" }');
expect(logs).toEqual(
expect.arrayContaining([
expect.objectContaining({