From 4661c793b890a8ff25135fd5f28752857c5456b9 Mon Sep 17 00:00:00 2001 From: Viktor Ashirov Date: Jul 01 2019 14:30:07 +0000 Subject: Issue 49761 - Fix CI test suite issues Description: Fix test failures in tier0 and tier1 tests: * Skip tests where it's not implemented. * Set custom fd limits to the value less than allowed per process. * Use a correct URI for ACI related tests in paged_results_test.py. Relates: https://pagure.io/389-ds-base/issue/49761 Reviewed by: mreynolds (Thanks!) --- diff --git a/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py b/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py index d2c2579..07e8a97 100644 --- a/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py +++ b/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py @@ -15,6 +15,7 @@ from lib389.idm.user import UserAccounts from lib389.idm.group import Groups from lib389.idm.organizationalunit import OrganizationalUnits from lib389._constants import DEFAULT_SUFFIX, LOG_ACCESS_LEVEL +from lib389.utils import ds_is_older import ldap pytestmark = pytest.mark.tier1 @@ -625,6 +626,7 @@ def test_internal_log_level_516(topology_st, add_user_log_level_516): assert topo.ds_access_log.match(r'.*conn=Internal\([0-9]+\) op=[0-9]+\([0-9]+\)\([0-9]+\).*') +@pytest.mark.skipif(ds_is_older('1.4.1.4'), reason="Not implemented") @pytest.mark.bz1358706 @pytest.mark.ds49232 def test_access_log_truncated_search_message(topology_st): diff --git a/dirsrvtests/tests/suites/paged_results/paged_results_test.py b/dirsrvtests/tests/suites/paged_results/paged_results_test.py index 6521ab1..d0fcf8b 100644 --- a/dirsrvtests/tests/suites/paged_results/paged_results_test.py +++ b/dirsrvtests/tests/suites/paged_results/paged_results_test.py @@ -551,7 +551,7 @@ def test_search_dns_ip_aci(topology_st, create_user, aci_subject): ACI_BODY = ensure_bytes(ACI_TARGET + ACI_ALLOW + ACI_SUBJECT) topology_st.standalone.modify_s(DEFAULT_SUFFIX, [(ldap.MOD_REPLACE, 'aci', ACI_BODY)]) log.info('Set user bind') - conn = create_user.bind(TEST_USER_PWD) + conn = create_user.bind(TEST_USER_PWD, uri=f'ldap://{IP_ADDRESS}:{topology_st.standalone.port}') log.info('Create simple paged results control instance') req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='') diff --git a/dirsrvtests/tests/suites/replication/replica_config_test.py b/dirsrvtests/tests/suites/replication/replica_config_test.py index 3dc0371..599f6ac 100644 --- a/dirsrvtests/tests/suites/replication/replica_config_test.py +++ b/dirsrvtests/tests/suites/replication/replica_config_test.py @@ -8,6 +8,7 @@ from lib389.topologies import topology_st as topo from lib389.replica import Replicas from lib389.agreement import Agreements +from lib389.utils import ds_is_older pytestmark = pytest.mark.tier1 @@ -256,6 +257,7 @@ def test_agmt_num_modify(topo, attr, too_small, too_big, overflow, notnum, valid agmt.replace(attr, valid) +@pytest.mark.skipif(ds_is_older('1.4.1.4'), reason="Not implemented") @pytest.mark.bz1546739 def test_same_attr_yields_same_return_code(topo): """Test that various operations with same incorrect attribute value yield same return code diff --git a/dirsrvtests/tests/suites/resource_limits/fdlimits_test.py b/dirsrvtests/tests/suites/resource_limits/fdlimits_test.py index c72e8f9..bd2b1e7 100644 --- a/dirsrvtests/tests/suites/resource_limits/fdlimits_test.py +++ b/dirsrvtests/tests/suites/resource_limits/fdlimits_test.py @@ -16,7 +16,7 @@ log = logging.getLogger(__name__) FD_ATTR = "nsslapd-maxdescriptors" GLOBAL_LIMIT = resource.getrlimit(resource.RLIMIT_NOFILE)[1] SYSTEMD_LIMIT = ensure_str(check_output("systemctl show --value -p LimitNOFILE dirsrv@standalone1".split(" ")).strip()) -CUSTOM_VAL = "9000" +CUSTOM_VAL = str(int(SYSTEMD_LIMIT) - 10) TOO_HIGH_VAL = str(GLOBAL_LIMIT * 2) TOO_HIGH_VAL2 = str(int(SYSTEMD_LIMIT) * 2) TOO_LOW_VAL = "0"