test: move TEST-11-ISSUE-3166 setup to static files
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=TEST-11-ISSUE-3166
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
systemctl start fail-on-restart.service
|
||||
active_state=$(systemctl show --value --property ActiveState fail-on-restart.service)
|
||||
while [[ "$active_state" == "activating" || "$active_state" == "active" ]]; do
|
||||
sleep 1
|
||||
active_state=$(systemctl show --value --property ActiveState fail-on-restart.service)
|
||||
done
|
||||
systemctl is-failed fail-on-restart.service || exit 1
|
||||
touch /testok
|
||||
Reference in New Issue
Block a user