diff options
author | Ronny Chevalier <chevalier.ronny@gmail.com> | 2014-11-05 21:27:01 +0100 |
---|---|---|
committer | Ronny Chevalier <chevalier.ronny@gmail.com> | 2014-11-08 22:45:56 +0100 |
commit | bc9992978cd1456b5bb79e72e8cf7a2331d3a7c6 (patch) | |
tree | 5b424971ef9c92663c8fdc6da40a4df28b923f9e /test | |
parent | ed7fb9cb235d2aedb755dcb8a5a5d9cdffba1519 (diff) | |
download | systemd-bc9992978cd1456b5bb79e72e8cf7a2331d3a7c6.tar.gz |
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.path | 8 | ||||
l--------- | test/path-changed.service | 1 | ||||
-rw-r--r-- | test/path-directorynotempty.path | 8 | ||||
l--------- | test/path-directorynotempty.service | 1 | ||||
-rw-r--r-- | test/path-exists.path | 8 | ||||
l--------- | test/path-exists.service | 1 | ||||
-rw-r--r-- | test/path-existsglob.path | 8 | ||||
l--------- | test/path-existsglob.service | 1 | ||||
-rw-r--r-- | test/path-makedirectory.path | 10 | ||||
l--------- | test/path-makedirectory.service | 1 | ||||
-rw-r--r-- | test/path-modified.path | 8 | ||||
l--------- | test/path-modified.service | 1 | ||||
-rw-r--r-- | test/path-mycustomunit.service | 6 | ||||
-rw-r--r-- | test/path-service.service | 6 | ||||
-rw-r--r-- | test/path-unit.path | 9 |
15 files changed, 77 insertions, 0 deletions
diff --git a/test/path-changed.path b/test/path-changed.path new file mode 100644 index 0000000000..e58bdd925f --- /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 0000000000..8bdf178830 --- /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 0000000000..17e599fc0e --- /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 0000000000..8bdf178830 --- /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 0000000000..c4c9105af4 --- /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 0000000000..8bdf178830 --- /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 0000000000..a058599605 --- /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 0000000000..8bdf178830 --- /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 0000000000..9408479c0f --- /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 0000000000..8bdf178830 --- /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 0000000000..18363227ba --- /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 0000000000..8bdf178830 --- /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 0000000000..172ac0d0d5 --- /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 0000000000..f8499ec619 --- /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 0000000000..95e572d6d5 --- /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 |