aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2014-11-05 21:27:01 +0100
committerRonny Chevalier <chevalier.ronny@gmail.com>2014-11-08 22:45:56 +0100
commitbc9992978cd1456b5bb79e72e8cf7a2331d3a7c6 (patch)
tree5b424971ef9c92663c8fdc6da40a4df28b923f9e /test
parentnetwork: fix typo (diff)
downloadsystemd-bc9992978cd1456b5bb79e72e8cf7a2331d3a7c6.tar.gz
systemd-bc9992978cd1456b5bb79e72e8cf7a2331d3a7c6.tar.bz2
systemd-bc9992978cd1456b5bb79e72e8cf7a2331d3a7c6.zip
tests: add test-path
It tests all available directives of Path units: - PathChanged - PathModified - PathExists - PathExisysGlob - DirectoryNotEmpty - MakeDirectory - DirectoryMode - Unit
Diffstat (limited to 'test')
-rw-r--r--test/path-changed.path8
l---------test/path-changed.service1
-rw-r--r--test/path-directorynotempty.path8
l---------test/path-directorynotempty.service1
-rw-r--r--test/path-exists.path8
l---------test/path-exists.service1
-rw-r--r--test/path-existsglob.path8
l---------test/path-existsglob.service1
-rw-r--r--test/path-makedirectory.path10
l---------test/path-makedirectory.service1
-rw-r--r--test/path-modified.path8
l---------test/path-modified.service1
-rw-r--r--test/path-mycustomunit.service6
-rw-r--r--test/path-service.service6
-rw-r--r--test/path-unit.path9
15 files changed, 77 insertions, 0 deletions
diff --git a/test/path-changed.path b/test/path-changed.path
new file mode 100644
index 000000000..e58bdd925
--- /dev/null
+++ b/test/path-changed.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test PathChanged
+
+[Path]
+PathChanged=/tmp/test-path_changed
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/path-changed.service b/test/path-changed.service
new file mode 120000
index 000000000..8bdf17883
--- /dev/null
+++ b/test/path-changed.service
@@ -0,0 +1 @@
+path-service.service \ No newline at end of file
diff --git a/test/path-directorynotempty.path b/test/path-directorynotempty.path
new file mode 100644
index 000000000..17e599fc0
--- /dev/null
+++ b/test/path-directorynotempty.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test DirectoryNotEmpty
+
+[Path]
+DirectoryNotEmpty=/tmp/test-path_directorynotempty/
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/path-directorynotempty.service b/test/path-directorynotempty.service
new file mode 120000
index 000000000..8bdf17883
--- /dev/null
+++ b/test/path-directorynotempty.service
@@ -0,0 +1 @@
+path-service.service \ No newline at end of file
diff --git a/test/path-exists.path b/test/path-exists.path
new file mode 100644
index 000000000..c4c9105af
--- /dev/null
+++ b/test/path-exists.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test PathExists
+
+[Path]
+PathExists=/tmp/test-path_exists
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/path-exists.service b/test/path-exists.service
new file mode 120000
index 000000000..8bdf17883
--- /dev/null
+++ b/test/path-exists.service
@@ -0,0 +1 @@
+path-service.service \ No newline at end of file
diff --git a/test/path-existsglob.path b/test/path-existsglob.path
new file mode 100644
index 000000000..a05859960
--- /dev/null
+++ b/test/path-existsglob.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test PathExistsGlob
+
+[Path]
+PathExistsGlob=/tmp/test-path_existsglob*
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/path-existsglob.service b/test/path-existsglob.service
new file mode 120000
index 000000000..8bdf17883
--- /dev/null
+++ b/test/path-existsglob.service
@@ -0,0 +1 @@
+path-service.service \ No newline at end of file
diff --git a/test/path-makedirectory.path b/test/path-makedirectory.path
new file mode 100644
index 000000000..9408479c0
--- /dev/null
+++ b/test/path-makedirectory.path
@@ -0,0 +1,10 @@
+[Unit]
+Description=Test MakeDirectory & DirectoryMode
+
+[Path]
+DirectoryNotEmpty=/tmp/test-path_makedirectory/
+MakeDirectory=yes
+DirectoryMode=0744
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/path-makedirectory.service b/test/path-makedirectory.service
new file mode 120000
index 000000000..8bdf17883
--- /dev/null
+++ b/test/path-makedirectory.service
@@ -0,0 +1 @@
+path-service.service \ No newline at end of file
diff --git a/test/path-modified.path b/test/path-modified.path
new file mode 100644
index 000000000..18363227b
--- /dev/null
+++ b/test/path-modified.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Test PathModified
+
+[Path]
+PathModified=/tmp/test-path_modified
+
+[Install]
+WantedBy=multi-user.target
diff --git a/test/path-modified.service b/test/path-modified.service
new file mode 120000
index 000000000..8bdf17883
--- /dev/null
+++ b/test/path-modified.service
@@ -0,0 +1 @@
+path-service.service \ No newline at end of file
diff --git a/test/path-mycustomunit.service b/test/path-mycustomunit.service
new file mode 100644
index 000000000..172ac0d0d
--- /dev/null
+++ b/test/path-mycustomunit.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Service Test Path Unit=
+
+[Service]
+ExecStart=/bin/true
+Type=oneshot
diff --git a/test/path-service.service b/test/path-service.service
new file mode 100644
index 000000000..f8499ec61
--- /dev/null
+++ b/test/path-service.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Service Test for Path units
+
+[Service]
+ExecStart=/bin/true
+Type=oneshot
diff --git a/test/path-unit.path b/test/path-unit.path
new file mode 100644
index 000000000..95e572d6d
--- /dev/null
+++ b/test/path-unit.path
@@ -0,0 +1,9 @@
+[Unit]
+Description=Test Path Unit=
+
+[Path]
+PathExists=/tmp/test-path_unit
+Unit=path-mycustomunit.service
+
+[Install]
+WantedBy=multi-user.target