@devries-cameron20 / composio Mirror · read-only / commits / 6c831195d
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 08:30 UTC

test(cli): expect the redacted auth config id in `connected-accounts info` under CI (#5010)

This PR: - fixes the `Test CLI (@composio/cli)` failure on `next` since #4994: `connected-accounts.info.handler.test.ts` expected the raw `ac_github_oauth`, but CI (`CI=true`) redacts ids, so the note prints `ac_<…>` - builds the expected value with the same `redact` helper the formatter uses, as `auth-configs.list.handler.test.ts` already does ## Context Every CLI PR currently fails `Test CLI (@composio/cli)` on this one test (e.g. https://github.com/ComposioHQ/composio/actions/runs/39466098940/job/118777790196). Verified: `pnpm exec vitest run test/src/commands/connected-accounts` passes with and without `CI=true`, and the full CLI suite passes under `CI=true` (2226 passed, 1 skipped).

Alberto Schiabel committed Oct 21, 2026 at 00:19 UTC 6c831195d2af44f7c9d913873cc07884d63732e0
1 file changed +5 -1
ts/packages/cli/test/src/commands/connected-accounts/info/connected-accounts.info.handler.test.ts
+5 -1
@@ -5,6 +5,7 @@ import { MISSING_ID_MESSAGE, missingIdHint } from 'src/commands/connected-accoun
5 import type { ConnectedAccountItem } from 'src/models/connected-accounts';
6 import { NodeProcess } from 'src/services/node-process';
7 import { TerminalUI } from 'src/services/terminal-ui';
8 +import { redact } from 'src/ui/redact';
9 import { ConnectedAccountsTest, MockConsole } from 'test/__utils__';
10 import { terminalUITestImpl } from 'test/__utils__/services/terminal-ui-test';
11
@@ -93,7 +94,10 @@ describe('runConnectedAccountsInfo', () => {
94 expect(note).toContain('Alias: work');
95 expect(note).toContain('Word Id: castle');
96 expect(note).toContain('Status Reason: Token expired');
96 - expect(note).toContain('Auth Config: ac_github_oauth (OAUTH2)');
97 + // CI redacts ids (`CI=true`), so expect the id the way the formatter prints it.
98 + expect(note).toContain(
99 + `Auth Config: ${redact({ value: 'ac_github_oauth', prefix: 'ac_' })} (OAUTH2)`
100 + );
101 expect(note).toContain('Composio Managed: No');
102 expect(note).toContain('Test Endpoint: https://api.github.com/user');
103 }).pipe(Effect.provide(layer));