mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
feat(offload): implement dynamic remote home resolution for reliable rsync
This commit is contained in:
@@ -35,11 +35,11 @@ describe('Offload Orchestration (GCE)', () => {
|
||||
vi.spyOn(process, 'chdir').mockImplementation(() => {});
|
||||
vi.spyOn(process, 'cwd').mockReturnValue('/test-cwd');
|
||||
|
||||
// Default mock for gcloud instance describe
|
||||
// Default mock for gcloud instance info and describe
|
||||
vi.mocked(spawnSync).mockImplementation((cmd: any, args: any) => {
|
||||
const callInfo = JSON.stringify({ cmd, args });
|
||||
if (callInfo.includes('compute') && callInfo.includes('describe')) {
|
||||
return { status: 0, stdout: Buffer.from('RUNNING\n'), stderr: Buffer.from('') } as any;
|
||||
if (callInfo.includes('gcloud') && callInfo.includes('ssh') && callInfo.includes('echo $HOME')) {
|
||||
return { status: 0, stdout: Buffer.from('/home/testuser\nRUNNING\n'), stderr: Buffer.from('') } as any;
|
||||
}
|
||||
if (callInfo.includes('gh') && callInfo.includes('view')) {
|
||||
return { status: 0, stdout: Buffer.from('test-meta\n'), stderr: Buffer.from('') } as any;
|
||||
|
||||
Reference in New Issue
Block a user