test: fix resolution paths for acpClient, topic-policy, and update golden files

This commit is contained in:
mkorwel
2026-04-16 00:21:25 +00:00
parent 2b0007ab53
commit f31d959095
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ import {
import { loadCliConfig, type CliArgs } from '../config/config.js';
import * as fs from 'node:fs/promises';
import * as path from 'node:path';
import { ApprovalMode } from '@google/gemini-cli-core/src/policy/types.js';
import { ApprovalMode } from '@google/gemini-cli-core';
vi.mock('../config/config.js', () => ({
loadCliConfig: vi.fn(),
@@ -14,7 +14,7 @@ import { UPDATE_TOPIC_TOOL_NAME } from '../tools/tool-names.js';
describe('Topic Tool Policy', () => {
async function loadDefaultPolicies() {
// Path relative to packages/core root
const policiesDir = path.resolve(process.cwd(), 'src/policy/policies');
const policiesDir = path.resolve(__dirname, 'policies');
const getPolicyTier = () => 1; // Default tier
const result = await loadPoliciesFromToml([policiesDir], getPolicyTier);
return result.rules;
@@ -261,4 +261,4 @@
"model": "gemini-3-flash-preview",
"generateContentConfig": {}
}
}
}
@@ -261,4 +261,4 @@
"model": "gemini-3-flash-preview",
"generateContentConfig": {}
}
}
}