Blame SOURCES/0001-Revert-4866-cl-trimming-not-applicable-in-1.4.3.patch

a77461
From 36da9be6b82c96a656fa6dd1f99e5a7c41c7652a Mon Sep 17 00:00:00 2001
a77461
From: Thierry Bordaz <tbordaz@redhat.com>
a77461
Date: Mon, 23 May 2022 16:53:41 +0200
a77461
Subject: [PATCH] Revert 4866 - cl trimming not applicable in 1.4.3
a77461
a77461
---
a77461
 .../suites/healthcheck/health_repl_test.py      |  2 +-
a77461
 .../tests/suites/replication/acceptance_test.py | 17 +----------------
a77461
 src/lib389/lib389/replica.py                    | 13 -------------
a77461
 3 files changed, 2 insertions(+), 30 deletions(-)
a77461
a77461
diff --git a/dirsrvtests/tests/suites/healthcheck/health_repl_test.py b/dirsrvtests/tests/suites/healthcheck/health_repl_test.py
a77461
index 9e1af2ff8..238d25290 100644
a77461
--- a/dirsrvtests/tests/suites/healthcheck/health_repl_test.py
a77461
+++ b/dirsrvtests/tests/suites/healthcheck/health_repl_test.py
a77461
@@ -74,7 +74,7 @@ def set_changelog_trimming(instance):
a77461
     inst_changelog = Changelog5(instance)
a77461
 
a77461
     log.info('Set nsslapd-changelogmaxage to 30d')
a77461
-    inst_changelog.set_max_age('30d')
a77461
+    inst_changelog.add('nsslapd-changelogmaxage', '30')
a77461
 
a77461
 
a77461
 @pytest.mark.ds50873
a77461
diff --git a/dirsrvtests/tests/suites/replication/acceptance_test.py b/dirsrvtests/tests/suites/replication/acceptance_test.py
a77461
index 8b96df7a4..a5f0c4c6b 100644
a77461
--- a/dirsrvtests/tests/suites/replication/acceptance_test.py
a77461
+++ b/dirsrvtests/tests/suites/replication/acceptance_test.py
a77461
@@ -15,7 +15,7 @@ from lib389.topologies import topology_m4 as topo_m4
a77461
 from lib389.topologies import topology_m2 as topo_m2
a77461
 from . import get_repl_entries
a77461
 from lib389.idm.user import UserAccount
a77461
-from lib389.replica import ReplicationManager, Changelog
a77461
+from lib389.replica import ReplicationManager
a77461
 from lib389._constants import *
a77461
 
a77461
 pytestmark = pytest.mark.tier0
a77461
@@ -645,21 +645,6 @@ def test_csngen_task(topo_m2):
a77461
     assert m1.searchErrorsLog("_csngen_gen_tester_main")
a77461
 
a77461
 
a77461
-def test_default_cl_trimming_enabled(topo_m2):
a77461
-    """Check that changelog trimming was enabled by default
a77461
-
a77461
-    :id: c37b9a28-f961-4867-b8a1-e81edd7f9bf3
a77461
-    :setup: Supplier Instance
a77461
-    :steps:
a77461
-        1. Check changelog has trimming set up by default
a77461
-    :expectedresults:
a77461
-        1. Success
a77461
-    """
a77461
-
a77461
-    # Set up changelog trimming by default
a77461
-    cl = Changelog(topo_m2.ms["supplier1"], DEFAULT_SUFFIX)
a77461
-    assert cl.get_attr_val_utf8("nsslapd-changelogmaxage") == "7d"
a77461
-
a77461
 
a77461
 if __name__ == '__main__':
a77461
     # Run isolated
a77461
diff --git a/src/lib389/lib389/replica.py b/src/lib389/lib389/replica.py
a77461
index c7328605b..90905dbf1 100644
a77461
--- a/src/lib389/lib389/replica.py
a77461
+++ b/src/lib389/lib389/replica.py
a77461
@@ -1667,19 +1667,6 @@ class Replicas(DSLdapObjects):
a77461
         self._childobject = Replica
a77461
         self._basedn = DN_MAPPING_TREE
a77461
 
a77461
-    def create(self, rdn=None, properties=None):
a77461
-        replica = super(Replicas, self).create(rdn, properties)
a77461
-
a77461
-        # Set up changelog trimming by default
a77461
-        if properties is not None:
a77461
-            for attr, val in properties.items():
a77461
-                if attr.lower() == 'nsds5replicaroot':
a77461
-                    cl = Changelog(self._instance, val[0])
a77461
-                    cl.set_max_age("7d")
a77461
-                    break
a77461
-
a77461
-        return replica
a77461
-
a77461
     def get(self, selector=[], dn=None):
a77461
         """Get a child entry (DSLdapObject, Replica, etc.) with dn or selector
a77461
         using a base DN and objectClasses of our object (DSLdapObjects, Replicas, etc.)
a77461
-- 
a77461
2.31.1
a77461