76 lines
2.3 KiB
Diff
76 lines
2.3 KiB
Diff
From af3fa90f91efda86f4337e8823bca6581ab61792 Mon Sep 17 00:00:00 2001
|
|
From: Thierry Bordaz <tbordaz@redhat.com>
|
|
Date: Fri, 7 Feb 2025 09:43:08 +0100
|
|
Subject: [PATCH] Issue 6494 - (2nd) Various errors when using extended
|
|
matching rule on vlv sort filter
|
|
|
|
---
|
|
.../tests/suites/indexes/regression_test.py | 40 +++++++++++++++++++
|
|
1 file changed, 40 insertions(+)
|
|
|
|
diff --git a/dirsrvtests/tests/suites/indexes/regression_test.py b/dirsrvtests/tests/suites/indexes/regression_test.py
|
|
index 2196fb2ed..b5bcccc8f 100644
|
|
--- a/dirsrvtests/tests/suites/indexes/regression_test.py
|
|
+++ b/dirsrvtests/tests/suites/indexes/regression_test.py
|
|
@@ -11,17 +11,57 @@ import os
|
|
import pytest
|
|
import ldap
|
|
from lib389._constants import DEFAULT_BENAME, DEFAULT_SUFFIX
|
|
+from lib389.backend import Backend, Backends, DatabaseConfig
|
|
from lib389.cos import CosClassicDefinition, CosClassicDefinitions, CosTemplate
|
|
+from lib389.dbgen import dbgen_users
|
|
from lib389.index import Indexes
|
|
from lib389.backend import Backends
|
|
from lib389.idm.user import UserAccounts
|
|
from lib389.topologies import topology_st as topo
|
|
from lib389.utils import ds_is_older
|
|
from lib389.idm.nscontainer import nsContainer
|
|
+from lib389.properties import TASK_WAIT
|
|
+from lib389.tasks import Tasks, Task
|
|
|
|
pytestmark = pytest.mark.tier1
|
|
|
|
|
|
+SUFFIX2 = 'dc=example2,dc=com'
|
|
+BENAME2 = 'be2'
|
|
+
|
|
+DEBUGGING = os.getenv("DEBUGGING", default=False)
|
|
+
|
|
+@pytest.fixture(scope="function")
|
|
+def add_backend_and_ldif_50K_users(request, topo):
|
|
+ """
|
|
+ Add an empty backend and associated 50K users ldif file
|
|
+ """
|
|
+
|
|
+ tasks = Tasks(topo.standalone)
|
|
+ import_ldif = f'{topo.standalone.ldifdir}/be2_50K_users.ldif'
|
|
+ be2 = Backend(topo.standalone)
|
|
+ be2.create(properties={
|
|
+ 'cn': BENAME2,
|
|
+ 'nsslapd-suffix': SUFFIX2,
|
|
+ },
|
|
+ )
|
|
+
|
|
+ def fin():
|
|
+ nonlocal be2
|
|
+ if not DEBUGGING:
|
|
+ be2.delete()
|
|
+
|
|
+ request.addfinalizer(fin)
|
|
+ parent = f'ou=people,{SUFFIX2}'
|
|
+ dbgen_users(topo.standalone, 50000, import_ldif, SUFFIX2, generic=True, parent=parent)
|
|
+ assert tasks.importLDIF(
|
|
+ suffix=SUFFIX2,
|
|
+ input_file=import_ldif,
|
|
+ args={TASK_WAIT: True}
|
|
+ ) == 0
|
|
+
|
|
+ return import_ldif
|
|
+
|
|
@pytest.fixture(scope="function")
|
|
def add_a_group_with_users(request, topo):
|
|
"""
|
|
--
|
|
2.49.0
|
|
|