mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 10:45:22 +00:00
refactor(permission-system): simplify policy and autoreview flow
This commit is contained in:
@@ -271,29 +271,6 @@ describe("PermissionSession", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("infrastructure paths", () => {
|
||||
it("getInfrastructureReadDirs combines piInfrastructureDirs and piInfrastructureReadPaths", () => {
|
||||
const configStore = makeConfigStore({
|
||||
current: vi.fn().mockReturnValue({
|
||||
piInfrastructureReadPaths: ["/extra/path"],
|
||||
}),
|
||||
});
|
||||
const { session } = createSession({ configStore });
|
||||
expect(session.getInfrastructureReadDirs()).toEqual([
|
||||
"/test/agent",
|
||||
"/test/agent/git",
|
||||
"/extra/path",
|
||||
]);
|
||||
});
|
||||
|
||||
it("getInfrastructureReadDirs returns only piInfrastructureDirs when config omits the field", () => {
|
||||
const { session } = createSession();
|
||||
expect(session.getInfrastructureReadDirs()).toEqual([
|
||||
"/test/agent",
|
||||
"/test/agent/git",
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("config delegation", () => {
|
||||
it("refreshConfig delegates to configStore.refresh with the trust flag", () => {
|
||||
|
||||
Reference in New Issue
Block a user