mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Run service test on py3 + unprivileged on docker. (#19841)
* Run service test on py3 + unprivileged on docker. * Fix service integration test for python 3.
This commit is contained in:
parent
a1d30c853c
commit
709a3aa42b
3 changed files with 3 additions and 6 deletions
|
@ -1,6 +1,4 @@
|
|||
destructive
|
||||
needs/privileged
|
||||
posix/ci/group1
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/python3
|
||||
|
|
|
@ -21,7 +21,7 @@ def createDaemon():
|
|||
try:
|
||||
pid = os.fork()
|
||||
except OSError as e:
|
||||
raise Exception, "%s [%d]" % (e.strerror, e.errno)
|
||||
raise Exception("%s [%d]" % (e.strerror, e.errno))
|
||||
|
||||
if (pid == 0):
|
||||
os.setsid()
|
||||
|
@ -29,7 +29,7 @@ def createDaemon():
|
|||
try:
|
||||
pid = os.fork()
|
||||
except OSError as e:
|
||||
raise Exception, "%s [%d]" % (e.strerror, e.errno)
|
||||
raise Exception("%s [%d]" % (e.strerror, e.errno))
|
||||
|
||||
if (pid == 0):
|
||||
os.chdir(WORKDIR)
|
||||
|
@ -45,7 +45,7 @@ def createDaemon():
|
|||
maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
|
||||
if (maxfd == resource.RLIM_INFINITY):
|
||||
maxfd = MAXFD
|
||||
|
||||
|
||||
for fd in range(0, maxfd):
|
||||
try:
|
||||
os.close(fd)
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
assert:
|
||||
that:
|
||||
- "install_result.dest == '/usr/sbin/ansible_test_service'"
|
||||
- "install_result.checksum == '4e0164ceb9a5aeab76b38483ffd27fe791baa9f4'"
|
||||
- "install_result.state == 'file'"
|
||||
- "install_result.mode == '0755'"
|
||||
|
||||
|
|
Loading…
Reference in a new issue