mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/user-activation-scripts: refactor assert
By using unittest's assertEqual you actually see how often the
activation script was being run, i.e. the expected value.
(cherry picked from commit 864a84d3e9)
This commit is contained in:
parent
663a59e0b6
commit
b1a881edb9
1 changed files with 3 additions and 2 deletions
|
|
@ -18,8 +18,9 @@
|
|||
|
||||
testScript = ''
|
||||
def verify_user_activation_run_count(n):
|
||||
machine.succeed(
|
||||
'[[ "$(find /home/alice/ -name user-activation-ran.\\* | wc -l)" == %s ]]' % n
|
||||
t.assertEqual(
|
||||
n,
|
||||
int(machine.succeed('find /home/alice/ -name user-activation-ran.\\* | wc -l').rstrip())
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue