mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
improve 'service' integration tests (#43655)
* service tests: check that daemon is really running (spoiler: it isn't) * service tests: add PIDFile directive in systemd unit * service tests: check 'changed' too * service tests: fix indentation & use changed test * service tests: #16694 has been fixed a long time ago * service tests: refactor - always execute cleaning tasks - move tests tasks in a dedicated file * service tests: add test for #42786 * service tests: display value of ansible_service_mgr * service tests: allow to run tests twice in a row stop & disable ansible test service * service tests: 'pattern' value must be a substring 'pattern' parameter is poorly named * service tests: check ansible_test service status * service tests: test daemon must handle SIGHUP because 'initctl reload' sends SIGHUP, otherwise test daemon stops when receiving the signal * service tests: remove upstart override file too and check that files were removed using raw module and stat command
This commit is contained in:
parent
88a738b0ba
commit
c5f37f6bd6
6 changed files with 225 additions and 159 deletions
|
@ -5,6 +5,7 @@ Description=Ansible Test Service
|
|||
ExecStart=/usr/sbin/ansible_test_service "Test\nthat newlines in scripts\nwork"
|
||||
ExecReload=/bin/true
|
||||
Type=forking
|
||||
PIDFile=/var/run/ansible_test_service.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue