mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
test: add grow/shrink/minimize test for homed
Let's add testing for the stuff we just added.
This commit is contained in:
parent
c8caf53ca2
commit
a89b67509f
@ -69,6 +69,39 @@ inspect test-user
|
||||
PASSWORD=xEhErW0ndafV4s homectl deactivate test-user
|
||||
inspect test-user
|
||||
|
||||
# Do some resize tests, but only if we run on real kernels, as quota inside of containers will fail
|
||||
if ! systemd-detect-virt -cq ; then
|
||||
# grow while inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl resize test-user 300M
|
||||
inspect test-user
|
||||
|
||||
# minimize while inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl resize test-user 0
|
||||
inspect test-user
|
||||
|
||||
PASSWORD=xEhErW0ndafV4s homectl activate test-user
|
||||
inspect test-user
|
||||
|
||||
# grow while active
|
||||
PASSWORD=xEhErW0ndafV4s homectl resize test-user 300M
|
||||
inspect test-user
|
||||
|
||||
# minimize while active
|
||||
PASSWORD=xEhErW0ndafV4s homectl resize test-user 0
|
||||
inspect test-user
|
||||
|
||||
# grow while active
|
||||
PASSWORD=xEhErW0ndafV4s homectl resize test-user 300M
|
||||
inspect test-user
|
||||
|
||||
# shrink to original size while active
|
||||
PASSWORD=xEhErW0ndafV4s homectl resize test-user 256M
|
||||
inspect test-user
|
||||
|
||||
PASSWORD=xEhErW0ndafV4s homectl deactivate test-user
|
||||
inspect test-user
|
||||
fi
|
||||
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- test ! -f /home/test-user/xyz
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- test -f /home/test-user/xyz \
|
||||
&& { echo 'unexpected success'; exit 1; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user