From 41b2d7ac1dbcc30e417bb25aff13698ca4d2bd58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 29 Apr 2021 09:47:23 +0200 Subject: [PATCH] TEST-15: add test for template aliases --- test/units/testsuite-15.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/units/testsuite-15.sh b/test/units/testsuite-15.sh index ae63d06833d..c3784e299d5 100755 --- a/test/units/testsuite-15.sh +++ b/test/units/testsuite-15.sh @@ -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 -- 2.47.3