| |
@@ -1196,12 +1196,16 @@
|
| |
with open(template_file, "w") as template_fd:
|
| |
template_fd.write(template_text)
|
| |
|
| |
+ # Unset PYTHONPATH to avoid mixing old CLI tools and new lib389
|
| |
+ tmp_env = os.environ
|
| |
+ if "PYTHONPATH" in tmp_env:
|
| |
+ del tmp_env["PYTHONPATH"]
|
| |
try:
|
| |
subprocess.check_call([
|
| |
'dscreate',
|
| |
'from-file',
|
| |
template_file
|
| |
- ])
|
| |
+ ], env=tmp_env)
|
| |
except subprocess.CalledProcessError as e:
|
| |
log.fatal("dscreate failed! Error ({}) {}".format(e.returncode, e.output))
|
| |
assert False
|
| |
Bug Description:
dscreate tests do not work properly when newer lib389 is used
with older 389-ds-base versions.
Fix Description:
Unset PYTHONPATH for dscreate if it's set to prevent clobbering system
lib389.
Don't run dscreate_test on older versions, where instance-specific sysconfig
env file is mentioned in systemd unit file. dscreate no longer creates it and
causes dirsrv service fail to start.
Don't check for instance-specific sysconfig env file on removing the instance
since it's no longer created.
Fixes https://pagure.io/389-ds-base/issue/50164
Reviewed by: ???