tests/codex: consolidate tests
Reduce test case setup to cover same logic branches. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
e0bcb05ce9
commit
6f2cb27ea6
7 changed files with 15 additions and 43 deletions
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
home.preferXdgDirectories = true;
|
||||
programs.codex = {
|
||||
enable = true;
|
||||
custom-instructions = ''
|
||||
- Always respond with emojis
|
||||
- Only use git commands when explicitly requested
|
||||
'';
|
||||
};
|
||||
nmt.script = ''
|
||||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'export CODEX_HOME="/home/hm-user/.config/codex"'
|
||||
assertFileExists home-files/.config/codex/AGENTS.md
|
||||
assertFileContent home-files/.config/codex/AGENTS.md \
|
||||
${./AGENTS.md}
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
programs.codex = {
|
||||
enable = true;
|
||||
custom-instructions = ''
|
||||
- Always respond with emojis
|
||||
- Only use git commands when explicitly requested
|
||||
'';
|
||||
};
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.codex/AGENTS.md
|
||||
assertFileContent home-files/.codex/AGENTS.md \
|
||||
${./AGENTS.md}
|
||||
'';
|
||||
}
|
||||
|
|
@ -3,9 +3,6 @@
|
|||
codex-settings-toml-prefer-xdg-directories = ./settings-toml-prefer-xdg-directories.nix;
|
||||
codex-settings-yaml = ./settings-yaml.nix;
|
||||
codex-empty-settings = ./empty-settings.nix;
|
||||
codex-custom-instructions = ./custom-instructions.nix;
|
||||
codex-custom-instructions-prefer-xdg-directories = ./custom-instructions-prefer-xdg-directories.nix;
|
||||
codex-empty-custom-instructions = ./empty-custom-instructions.nix;
|
||||
codex-mcp-integration = ./mcp-integration.nix;
|
||||
codex-mcp-integration-with-override = ./mcp-integration-with-override.nix;
|
||||
codex-skills-inline = ./skills-inline.nix;
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
programs.codex = {
|
||||
enable = true;
|
||||
custom-instructions = "";
|
||||
};
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.codex/AGENTS.md
|
||||
'';
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
nmt.script = ''
|
||||
assertPathNotExists home-files/.codex/config.toml
|
||||
assertPathNotExists home-files/.codex/config.yaml
|
||||
assertPathNotExists home-files/.codex/AGENTS.md
|
||||
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'CODEX_HOME'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
custom-instructions = ''
|
||||
- Always respond with emojis
|
||||
- Only use git commands when explicitly requested
|
||||
'';
|
||||
};
|
||||
nmt.script = ''
|
||||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
||||
|
|
@ -29,5 +33,8 @@ in
|
|||
assertFileExists home-files/.config/codex/config.toml
|
||||
assertFileContent home-files/.config/codex/config.toml \
|
||||
${./config.toml}
|
||||
assertFileExists home-files/.config/codex/AGENTS.md
|
||||
assertFileContent home-files/.config/codex/AGENTS.md \
|
||||
${./AGENTS.md}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,11 +21,18 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
custom-instructions = ''
|
||||
- Always respond with emojis
|
||||
- Only use git commands when explicitly requested
|
||||
'';
|
||||
};
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.codex/config.toml
|
||||
assertFileContent home-files/.codex/config.toml \
|
||||
${./config.toml}
|
||||
assertFileExists home-files/.codex/AGENTS.md
|
||||
assertFileContent home-files/.codex/AGENTS.md \
|
||||
${./AGENTS.md}
|
||||
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'CODEX_HOME'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue