mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00: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.
This commit is contained in:
@@ -17,8 +17,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())
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user