Skip to content

Commit 02d637f

Browse files
authored
fix(e2e): accept CONFIG_ERROR (exit 78) in xiaoyuzhou E2E guard (#1066)
PR #1059 migrated xiaoyuzhou from SSR scraping to authenticated API. The E2E tests run without credentials, producing exit code 78 (CONFIG_ERROR). The existing `isExpectedChineseSiteRestriction` guard only caught FETCH_ERROR, PARSE_ERROR, and NOT_FOUND — not config errors from missing auth credentials.
1 parent 44d8787 commit 02d637f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/e2e/public-commands.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ function isExpectedChineseSiteRestriction(code: number, stderr: string): boolean
1414
// Overseas CI runners may get HTTP errors, geo-blocks, DNS failures,
1515
// or receive mangled HTML that fails parsing. Some runners also fail
1616
// without surfacing a useful stderr payload.
17+
// Exit code 78 (CONFIG_ERROR) covers adapters that migrated to authenticated
18+
// APIs — credentials won't be available in CI.
1719
return /Error \[(FETCH_ERROR|PARSE_ERROR|NOT_FOUND)\]/.test(stderr)
1820
|| /fetch failed/.test(stderr)
21+
|| /code: CONFIG/.test(stderr)
22+
|| code === 78
1923
|| stderr.trim() === '';
2024
}
2125

0 commit comments

Comments
 (0)