mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 20:17:03 +00:00
test(ci): isolate CCS-managed env vars from host session
When tests run inside a CCS-managed Claude session, host env vars (CLAUDE_CONFIG_DIR, CCS_PROFILE_TYPE) leak into subprocess spawns and fixture setup, causing 9 test failures: - persist-command-handler: reads real symlinked settings.json instead of temp fixture because CLAUDE_CONFIG_DIR overrides scoped CCS_HOME - websearch-transformer: hook silently exits via shouldSkipHook() because CCS_PROFILE_TYPE=account triggers native_account_profile skip - claudecode-env-stripping: normalizeSharedPluginMetadataPaths receives leaked CLAUDE_CONFIG_DIR instead of undefined for default profiles Fix: clear CCS-managed env vars in beforeEach and neutralize CCS_PROFILE_TYPE in subprocess env blocks. Built [OnSteroids](https://onsteroids.ai)
This commit is contained in:
1 parent
8e413e49f6
commit
2cc92e8bb8
3 files changed
+12
No files matched your search
@@ -101,6 +101,7 @@ function runHookWithMockedFetch(mode: 'success' | 'empty' | 'non-result' | 'fail
|
||||
}),
|
||||
env: {
|
||||
...process.env,
|
||||
CCS_PROFILE_TYPE: '',
|
||||
CCS_WEBSEARCH_ENABLED: '1',
|
||||
CCS_WEBSEARCH_SKIP: '0',
|
||||
CCS_WEBSEARCH_BRAVE: '0',
|
||||
@@ -352,6 +353,7 @@ describe('websearch-transformer hook helpers', () => {
|
||||
}),
|
||||
env: {
|
||||
...process.env,
|
||||
CCS_PROFILE_TYPE: '',
|
||||
CCS_HOME: ccsHome,
|
||||
CCS_WEBSEARCH_TRACE: '1',
|
||||
CCS_WEBSEARCH_TRACE_LAUNCH_ID: 'hook-trace-test',
|
||||
@@ -428,6 +430,7 @@ describe('websearch-transformer hook helpers', () => {
|
||||
}),
|
||||
env: {
|
||||
...process.env,
|
||||
CCS_PROFILE_TYPE: '',
|
||||
CCS_HOME: ccsHome,
|
||||
CCS_WEBSEARCH_TRACE: '1',
|
||||
CCS_WEBSEARCH_TRACE_FILE: disallowedTracePath,
|
||||
@@ -509,6 +512,7 @@ global.fetch = async (url) => {
|
||||
}),
|
||||
env: {
|
||||
...process.env,
|
||||
CCS_PROFILE_TYPE: '',
|
||||
CCS_HOME: ccsHome,
|
||||
CCS_WEBSEARCH_TRACE: '1',
|
||||
CCS_WEBSEARCH_TRACE_LAUNCH_ID: 'quota-fallback-test',
|
||||
@@ -623,6 +627,7 @@ global.fetch = async (url) => {
|
||||
}),
|
||||
env: {
|
||||
...process.env,
|
||||
CCS_PROFILE_TYPE: '',
|
||||
CCS_HOME: ccsHome,
|
||||
CCS_WEBSEARCH_TRACE: '1',
|
||||
CCS_WEBSEARCH_TRACE_LAUNCH_ID: 'cooldown-skip-test',
|
||||
@@ -723,6 +728,7 @@ global.fetch = async (url) => {
|
||||
}),
|
||||
env: {
|
||||
...process.env,
|
||||
CCS_PROFILE_TYPE: '',
|
||||
CCS_HOME: ccsHome,
|
||||
CCS_WEBSEARCH_TRACE: '1',
|
||||
CCS_WEBSEARCH_TRACE_LAUNCH_ID: 'transient-retry-test',
|
||||
|
||||
Reference in new issue
Block a user