mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 19:15:39 +00:00
nixos/lxd: fix race condition in test
This commit is contained in:
parent
c1b8fdf83b
commit
243521f52f
|
@ -96,6 +96,7 @@ in {
|
||||||
## limits.cpu ##
|
## limits.cpu ##
|
||||||
|
|
||||||
machine.succeed("lxc config set test limits.cpu 1")
|
machine.succeed("lxc config set test limits.cpu 1")
|
||||||
|
machine.succeed("lxc restart test")
|
||||||
|
|
||||||
# Since Alpine doesn't have `nproc` pre-installed, we've gotta resort
|
# Since Alpine doesn't have `nproc` pre-installed, we've gotta resort
|
||||||
# to the primal methods
|
# to the primal methods
|
||||||
|
@ -105,6 +106,7 @@ in {
|
||||||
)
|
)
|
||||||
|
|
||||||
machine.succeed("lxc config set test limits.cpu 2")
|
machine.succeed("lxc config set test limits.cpu 2")
|
||||||
|
machine.succeed("lxc restart test")
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
"2"
|
"2"
|
||||||
|
@ -115,6 +117,7 @@ in {
|
||||||
## limits.memory ##
|
## limits.memory ##
|
||||||
|
|
||||||
machine.succeed("lxc config set test limits.memory 64MB")
|
machine.succeed("lxc config set test limits.memory 64MB")
|
||||||
|
machine.succeed("lxc restart test")
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
"MemTotal: 62500 kB"
|
"MemTotal: 62500 kB"
|
||||||
|
@ -122,6 +125,7 @@ in {
|
||||||
)
|
)
|
||||||
|
|
||||||
machine.succeed("lxc config set test limits.memory 128MB")
|
machine.succeed("lxc config set test limits.memory 128MB")
|
||||||
|
machine.succeed("lxc restart test")
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
"MemTotal: 125000 kB"
|
"MemTotal: 125000 kB"
|
||||||
|
|
Loading…
Reference in a new issue