mirror of
https://github.com/systemd/systemd.git
synced 2025-03-14 04:58:28 +03:00
TEST-15: add test for template aliases
This commit is contained in:
parent
fd22838734
commit
41b2d7ac1d
@ -148,6 +148,32 @@ test_linked_units () {
|
||||
clear_services test15-a test15-b
|
||||
}
|
||||
|
||||
test_template_alias() {
|
||||
echo "Testing instance alias..."
|
||||
echo "*** forward"
|
||||
|
||||
create_service test15-a@
|
||||
ln -s test15-a@inst.service /etc/systemd/system/test15-b@inst.service # alias
|
||||
|
||||
check_ok test15-a@inst Names test15-a@inst.service
|
||||
check_ok test15-a@inst Names test15-b@inst.service
|
||||
|
||||
check_ok test15-a@other Names test15-a@other.service
|
||||
check_ko test15-a@other Names test15-b@other.service
|
||||
|
||||
echo "*** reverse"
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
check_ok test15-b@inst Names test15-a@inst.service
|
||||
check_ok test15-b@inst Names test15-b@inst.service
|
||||
|
||||
check_ko test15-b@other Names test15-a@other.service
|
||||
check_ok test15-b@other Names test15-b@other.service
|
||||
|
||||
clear_services test15-a@ test15-b@
|
||||
}
|
||||
|
||||
test_hierarchical_dropins () {
|
||||
echo "Testing hierarchical dropins..."
|
||||
echo "*** test service.d/ top level drop-in"
|
||||
@ -490,6 +516,7 @@ test_invalid_dropins () {
|
||||
|
||||
test_basic_dropins
|
||||
test_linked_units
|
||||
test_template_alias
|
||||
test_hierarchical_dropins
|
||||
test_template_dropins
|
||||
test_alias_dropins
|
||||
|
Loading…
x
Reference in New Issue
Block a user