| |
@@ -9,12 +9,14 @@
|
| |
import os
|
| |
import subprocess
|
| |
import pytest
|
| |
+ import logging
|
| |
+ from lib389 import DirSrv
|
| |
from lib389.instance.remove import remove_ds_instance
|
| |
from lib389._constants import ReplicaRole
|
| |
from lib389.topologies import create_topology
|
| |
|
| |
|
| |
- @pytest.fixture(scope="module")
|
| |
+ @pytest.fixture(scope="function")
|
| |
def topology_st(request):
|
| |
"""Create DS standalone instance"""
|
| |
|
| |
@@ -28,11 +30,17 @@
|
| |
return topology
|
| |
|
| |
|
| |
- def test_basic(topology_st):
|
| |
+ @pytest.mark.parametrize("simple_allocate", (True, False))
|
| |
+ def test_basic(topology_st, simple_allocate):
|
| |
"""Check that all DS directories and systemd items were removed"""
|
| |
|
| |
inst = topology_st.standalone
|
| |
|
| |
+ # FreeIPA uses local_simple_allocate for the removal process
|
| |
+ if simple_allocate:
|
| |
+ inst = DirSrv(verbose=inst.verbose)
|
| |
+ inst.local_simple_allocate(topology_st.standalone.serverid)
|
| |
+
|
| |
remove_ds_instance(inst)
|
| |
|
| |
paths = [inst.ds_paths.backup_dir,
|
| |
@@ -51,3 +59,5 @@
|
| |
subprocess.check_output(['systemctl', 'is-enabled', 'dirsrv@{}'.format(inst.serverid)], encoding='utf-8')
|
| |
except subprocess.CalledProcessError as ex:
|
| |
assert "disabled" in ex.output
|
| |
+
|
| |
+
|
| |
Description: remove_ds_instance function require DirSrv
object having port and sslport defined for semanage remove
label operation. We should set it in local_simple_allocate too.
Fix DSEldif.get function so it returns a list instead of a view
(Python 3 change).
https://pagure.io/389-ds-base/issue/50071
Reviewed by: ?