summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/systemd/systemd-complex-service-file
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/systemd/systemd-complex-service-file')
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/install6
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test.service9
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test2.service4
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test3.service6
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test4.service8
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test5.service11
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test@.service5
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/build-spec/fill-values4
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/eval/desc2
-rw-r--r--t/recipes/checks/systemd/systemd-complex-service-file/eval/hints15
10 files changed, 70 insertions, 0 deletions
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/install b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/install
new file mode 100644
index 0000000..41c700e
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/install
@@ -0,0 +1,6 @@
+debian/test.service usr/lib/systemd/system/
+debian/test2.service usr/lib/systemd/system/
+debian/test3.service usr/lib/systemd/system/
+debian/test4.service usr/lib/systemd/system/
+debian/test5.service usr/lib/systemd/system/
+debian/test@.service usr/lib/systemd/system/
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test.service b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test.service
new file mode 100644
index 0000000..60f401a
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test.service
@@ -0,0 +1,9 @@
+[Unit]
+After=dbus.target
+Documentation=https://www.freedesktop.org/wiki/Software/dbus/
+
+[Service]
+ExecStart=/usr/bin/test
+
+[Install]
+RequiredBy=multi-user.target
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test2.service b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test2.service
new file mode 100644
index 0000000..d98eb9f
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test2.service
@@ -0,0 +1,4 @@
+[Unit]
+After=
+After=syslog.target
+Documentation=https://www.freedesktop.org/wiki/Software/dbus/
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test3.service b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test3.service
new file mode 100644
index 0000000..88e5f4e
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test3.service
@@ -0,0 +1,6 @@
+[Unit]
+After=
+After = syslog.target
+
+[Install]
+WantedBy=multi-user.target
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test4.service b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test4.service
new file mode 100644
index 0000000..d63a719
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test4.service
@@ -0,0 +1,8 @@
+[Unit]
+Documentation=https://www.example.com/
+
+[Service]
+ExecStart=/usr/bin/test
+
+[Install]
+Also=test3
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test5.service b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test5.service
new file mode 100644
index 0000000..d26713a
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test5.service
@@ -0,0 +1,11 @@
+[Unit]
+Documentation=https://www.example.com/
+
+[Service]
+Type=oneshot
+ExecStart=/etc/init.d/test5 start
+ExecStartPre=/etc/init.d/test5 start-pre
+ExecStartPost=/etc/init.d/test5 start-post
+ExecReload=/etc/init.d/test5 reload
+ExecStop=/etc/init.d/test5 stop
+ExecStopPost=/etc/init.d/test5 stop-post
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test@.service b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test@.service
new file mode 100644
index 0000000..d54ea5d
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/debian/test@.service
@@ -0,0 +1,5 @@
+[Unit]
+Documentation=https://www.example.com/
+
+[Service]
+ExecStart=/usr/bin/test
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/fill-values b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/fill-values
new file mode 100644
index 0000000..dad1cdf
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/build-spec/fill-values
@@ -0,0 +1,4 @@
+Skeleton: upload-native
+Testname: systemd-complex-service-file
+Dh-Compat-Level: 9
+Description: Long ago tested the dropped .include directive; now another general purpose test
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/eval/desc b/t/recipes/checks/systemd/systemd-complex-service-file/eval/desc
new file mode 100644
index 0000000..1482531
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/eval/desc
@@ -0,0 +1,2 @@
+Testname: systemd-complex-service-file
+Check: systemd
diff --git a/t/recipes/checks/systemd/systemd-complex-service-file/eval/hints b/t/recipes/checks/systemd/systemd-complex-service-file/eval/hints
new file mode 100644
index 0000000..de49b8d
--- /dev/null
+++ b/t/recipes/checks/systemd/systemd-complex-service-file/eval/hints
@@ -0,0 +1,15 @@
+systemd-complex-service-file (binary): systemd-service-file-wraps-init-script ExecStopPost [usr/lib/systemd/system/test5.service]
+systemd-complex-service-file (binary): systemd-service-file-wraps-init-script ExecStop [usr/lib/systemd/system/test5.service]
+systemd-complex-service-file (binary): systemd-service-file-wraps-init-script ExecStartPre [usr/lib/systemd/system/test5.service]
+systemd-complex-service-file (binary): systemd-service-file-wraps-init-script ExecStartPost [usr/lib/systemd/system/test5.service]
+systemd-complex-service-file (binary): systemd-service-file-wraps-init-script ExecStart [usr/lib/systemd/system/test5.service]
+systemd-complex-service-file (binary): systemd-service-file-wraps-init-script ExecReload [usr/lib/systemd/system/test5.service]
+systemd-complex-service-file (binary): systemd-service-file-refers-to-obsolete-target syslog.target [usr/lib/systemd/system/test2.service]
+systemd-complex-service-file (binary): systemd-service-file-refers-to-obsolete-target dbus.target [usr/lib/systemd/system/test.service]
+systemd-complex-service-file (binary): systemd-service-file-missing-install-key [usr/lib/systemd/system/test2.service]
+systemd-complex-service-file (binary): systemd-service-file-missing-hardening-features [usr/lib/systemd/system/test@.service]
+systemd-complex-service-file (binary): systemd-service-file-missing-hardening-features [usr/lib/systemd/system/test4.service]
+systemd-complex-service-file (binary): systemd-service-file-missing-hardening-features [usr/lib/systemd/system/test3.service]
+systemd-complex-service-file (binary): systemd-service-file-missing-hardening-features [usr/lib/systemd/system/test2.service]
+systemd-complex-service-file (binary): systemd-service-file-missing-hardening-features [usr/lib/systemd/system/test.service]
+systemd-complex-service-file (binary): systemd-service-file-missing-documentation-key [usr/lib/systemd/system/test3.service]