mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-13 12:58:20 +03:00
test: add test cases for issue #30357
(cherry picked from commit 9d51ab78300364c71a0e1f138e1d2cbc65771b93) (cherry picked from commit d644d2f562051a86f7a8b2a8e382cee315463bd9) (cherry picked from commit 948239494414da16147162871bac109b197c35e7)
This commit is contained in:
parent
ca77533a05
commit
e60c4b4512
@ -296,6 +296,44 @@ EOF
|
|||||||
# Verifies that the --offline= option works with --root=
|
# Verifies that the --offline= option works with --root=
|
||||||
systemd-analyze security --threshold=90 --offline=true --root=/tmp/img/ testfile.service
|
systemd-analyze security --threshold=90 --offline=true --root=/tmp/img/ testfile.service
|
||||||
|
|
||||||
|
cat <<EOF >/tmp/foo@.service
|
||||||
|
[Service]
|
||||||
|
ExecStart=ls
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF >/tmp/hoge@test.service
|
||||||
|
[Service]
|
||||||
|
ExecStart=ls
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# issue #30357
|
||||||
|
pushd /tmp
|
||||||
|
systemd-analyze verify foo@bar.service
|
||||||
|
systemd-analyze verify foo@.service
|
||||||
|
systemd-analyze verify hoge@test.service
|
||||||
|
(! systemd-analyze verify hoge@nonexist.service)
|
||||||
|
(! systemd-analyze verify hoge@.service)
|
||||||
|
popd
|
||||||
|
pushd /
|
||||||
|
systemd-analyze verify tmp/foo@bar.service
|
||||||
|
systemd-analyze verify tmp/foo@.service
|
||||||
|
systemd-analyze verify tmp/hoge@test.service
|
||||||
|
(! systemd-analyze verify tmp/hoge@nonexist.service)
|
||||||
|
(! systemd-analyze verify tmp/hoge@.service)
|
||||||
|
popd
|
||||||
|
pushd /usr
|
||||||
|
systemd-analyze verify ../tmp/foo@bar.service
|
||||||
|
systemd-analyze verify ../tmp/foo@.service
|
||||||
|
systemd-analyze verify ../tmp/hoge@test.service
|
||||||
|
(! systemd-analyze verify ../tmp/hoge@nonexist.service)
|
||||||
|
(! systemd-analyze verify ../tmp/hoge@.service)
|
||||||
|
popd
|
||||||
|
systemd-analyze verify /tmp/foo@bar.service
|
||||||
|
systemd-analyze verify /tmp/foo@.service
|
||||||
|
systemd-analyze verify /tmp/hoge@test.service
|
||||||
|
(! systemd-analyze verify /tmp/hoge@nonexist.service)
|
||||||
|
(! systemd-analyze verify /tmp/hoge@.service)
|
||||||
|
|
||||||
# Added an additional "INVALID_ID" id to the .json to verify that nothing breaks when input is malformed
|
# Added an additional "INVALID_ID" id to the .json to verify that nothing breaks when input is malformed
|
||||||
# The PrivateNetwork id description and weight was changed to verify that 'security' is actually reading in
|
# The PrivateNetwork id description and weight was changed to verify that 'security' is actually reading in
|
||||||
# values from the .json file when required. The default weight for "PrivateNetwork" is 2500, and the new weight
|
# values from the .json file when required. The default weight for "PrivateNetwork" is 2500, and the new weight
|
||||||
|
Loading…
x
Reference in New Issue
Block a user