mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 00:51:04 +01:00
test: update tests path for new pwd-store path
This commit is contained in:
parent
14bc4c56fc
commit
a26b74229f
9 changed files with 85 additions and 8 deletions
9
tests/modules/programs/password-store/default-path.nix
Normal file
9
tests/modules/programs/password-store/default-path.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
home.stateVersion = "25.11"; # Or any other newer version
|
||||
programs.password-store.enable = true;
|
||||
|
||||
nmt.script = ''
|
||||
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'^export PASSWORD_STORE_DIR='
|
||||
'';
|
||||
}
|
||||
5
tests/modules/programs/password-store/default.nix
Normal file
5
tests/modules/programs/password-store/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
password-store-default-path = ./default-path.nix;
|
||||
password-store-old-default-path = ./old-default-path.nix;
|
||||
password-store-nondefault-path = ./nondefault-path.nix;
|
||||
}
|
||||
15
tests/modules/programs/password-store/nondefault-path.nix
Normal file
15
tests/modules/programs/password-store/nondefault-path.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
let
|
||||
somePath = "/some/random/path/I/store/pwds";
|
||||
in
|
||||
{
|
||||
home.stateVersion = "25.11";
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
settings.PASSWORD_STORE_DIR = somePath;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'export PASSWORD_STORE_DIR="${somePath}"'
|
||||
'';
|
||||
}
|
||||
10
tests/modules/programs/password-store/old-default-path.nix
Normal file
10
tests/modules/programs/password-store/old-default-path.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
home.stateVersion = "25.05"; # <= 25.11
|
||||
programs.password-store.enable = true;
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'export PASSWORD_STORE_DIR="${config.xdg.dataHome}/password-store"'
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue