tests/gemini-cli: add policy assertions
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
[[rule]]
|
||||
commandPrefix = "git "
|
||||
decision = "ask_user"
|
||||
priority = 100
|
||||
toolName = "run_shell_command"
|
||||
@@ -0,0 +1,4 @@
|
||||
[[rule]]
|
||||
toolName = "read_file"
|
||||
decision = "allow"
|
||||
priority = 50
|
||||
@@ -20,6 +20,19 @@
|
||||
description = "Generates a fix for a given GitHub issue.";
|
||||
};
|
||||
};
|
||||
policies = {
|
||||
"my-rules" = {
|
||||
rule = [
|
||||
{
|
||||
toolName = "run_shell_command";
|
||||
commandPrefix = "git ";
|
||||
decision = "ask_user";
|
||||
priority = 100;
|
||||
}
|
||||
];
|
||||
};
|
||||
"other-rules" = ./other-rules.toml;
|
||||
};
|
||||
};
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.gemini/settings.json
|
||||
@@ -29,6 +42,10 @@
|
||||
${./changelog.toml}
|
||||
assertFileContent home-files/.gemini/commands/git/fix.toml \
|
||||
${./fix.toml}
|
||||
assertFileContent home-files/.gemini/policies/my-rules.toml \
|
||||
${./my-rules.toml}
|
||||
assertFileContent home-files/.gemini/policies/other-rules.toml \
|
||||
${./other-rules.toml}
|
||||
|
||||
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
|
||||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
||||
|
||||
Reference in New Issue
Block a user