mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-10 13:03:11 +00:00
tests: fix nix_collect_garbage
This commit is contained in:
parent
e6b7a1c168
commit
6afaefbb41
|
@ -123,7 +123,13 @@ def test_graphql_nix_collect_garbage(authorized_client, fp):
|
|||
assert huey.immediate is True
|
||||
|
||||
fp.register(
|
||||
["nix-env", "-p", "/nix/var/nix/profiles/system", "--delete-generations old"],
|
||||
[
|
||||
"nix-env",
|
||||
"-p",
|
||||
"/nix/var/nix/profiles/system",
|
||||
"--delete-generations",
|
||||
"old",
|
||||
],
|
||||
stdout="",
|
||||
)
|
||||
fp.register(["nix-store", "--gc", "--print-dead"], stdout=OUTPUT_PRINT_DEAD)
|
||||
|
@ -148,7 +154,8 @@ def test_graphql_nix_collect_garbage(authorized_client, fp):
|
|||
"nix-env",
|
||||
"-p",
|
||||
"/nix/var/nix/profiles/system",
|
||||
"--delete-generations old",
|
||||
"--delete-generations",
|
||||
"old",
|
||||
]
|
||||
)
|
||||
== 1
|
||||
|
@ -161,7 +168,13 @@ def test_graphql_nix_collect_garbage_return_zero_trash(authorized_client, fp):
|
|||
assert huey.immediate is True
|
||||
|
||||
fp.register(
|
||||
["nix-env", "-p", "/nix/var/nix/profiles/system", "--delete-generations old"],
|
||||
[
|
||||
"nix-env",
|
||||
"-p",
|
||||
"/nix/var/nix/profiles/system",
|
||||
"--delete-generations",
|
||||
"old",
|
||||
],
|
||||
stdout="",
|
||||
)
|
||||
fp.register(["nix-store", "--gc", "--print-dead"], stdout=OUTPUT_PRINT_DEAD)
|
||||
|
@ -186,7 +199,8 @@ def test_graphql_nix_collect_garbage_return_zero_trash(authorized_client, fp):
|
|||
"nix-env",
|
||||
"-p",
|
||||
"/nix/var/nix/profiles/system",
|
||||
"--delete-generations old",
|
||||
"--delete-generations",
|
||||
"old",
|
||||
]
|
||||
)
|
||||
== 1
|
||||
|
@ -199,7 +213,13 @@ def test_graphql_nix_collect_garbage_not_authorized_client(client, fp):
|
|||
assert huey.immediate is True
|
||||
|
||||
fp.register(
|
||||
["nix-env", "-p", "/nix/var/nix/profiles/system", "--delete-generations old"],
|
||||
[
|
||||
"nix-env",
|
||||
"-p",
|
||||
"/nix/var/nix/profiles/system",
|
||||
"--delete-generations",
|
||||
"old",
|
||||
],
|
||||
stdout="",
|
||||
)
|
||||
fp.register(["nix-store", "--gc", "--print-dead"], stdout=OUTPUT_PRINT_DEAD)
|
||||
|
@ -220,7 +240,8 @@ def test_graphql_nix_collect_garbage_not_authorized_client(client, fp):
|
|||
"nix-env",
|
||||
"-p",
|
||||
"/nix/var/nix/profiles/system",
|
||||
"--delete-generations old",
|
||||
"--delete-generations",
|
||||
"old",
|
||||
]
|
||||
)
|
||||
== 0
|
||||
|
|
Loading…
Reference in a new issue