mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Extended python3 test to do an additional client test
The additional client test is needed to make sure that the client is installed for python3 usage. The ipalib test has not been sufficient.
This commit is contained in:
9
roles/ipaclient/files/py3test.py
Normal file
9
roles/ipaclient/files/py3test.py
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# Test ipaclient python3 binding
|
||||
from ipaclient.install.client import SECURE_PATH
|
||||
|
||||
# Check ipapython version to be >= 4.6
|
||||
from ipapython.version import NUM_VERSION, VERSION
|
||||
if NUM_VERSION < 40600:
|
||||
raise Exception("ipa %s not usable with python3" % VERSION)
|
||||
@@ -1,6 +1,6 @@
|
||||
- block:
|
||||
- name: Verify Python3 import
|
||||
command: python3 -c "from ipapython.version import NUM_VERSION"
|
||||
script: py3test.py
|
||||
register: py3test
|
||||
failed_when: False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user