mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
home manager: add test for option subcommand
- added a test to the standalone-basics unit: the option subcommand queries the `home.username` value and ensures that something sane is returned. details: - the option subcommand was broken by upstream changes to the `nixos-option` command. - hm had no tests for the option subcommand, so the problem was discovered by users. - output from nixos-option probably starts with 'Value:\n "alice"', but we're only looking for 'alice' because the output format is not guaranteed.
This commit is contained in:
parent
64c49b1aa5
commit
3c16ac3646
1 changed files with 6 additions and 0 deletions
|
|
@ -107,6 +107,12 @@
|
|||
assert expected in actual, \
|
||||
f"expected generations to contain {expected}, but found {actual}"
|
||||
|
||||
with subtest("Home Manager option"):
|
||||
actual = succeed_as_alice("home-manager option home.username")
|
||||
expected = "alice"
|
||||
assert expected in actual, \
|
||||
f"expected generations to contain {expected}, but found {actual}"
|
||||
|
||||
with subtest("Home Manager uninstallation"):
|
||||
succeed_as_alice("yes | home-manager uninstall -L")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue