#50479 Issue 49761 - Fix CI test suite issues
Closed 3 years ago by spichugi. Opened 4 years ago by vashirov.
vashirov/389-ds-base fix-tests-on-rhel8  into  master

@@ -15,6 +15,7 @@ 

  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 @@ 

      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):

@@ -551,7 +551,7 @@ 

          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='')

@@ -8,6 +8,7 @@ 

  

  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 @@ 

      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

@@ -16,7 +16,7 @@ 

  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"

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: ???

# py.test-3 -v suites/ds_logs/ds_logs_test.py suites/paged_results/paged_results_test.py suites/replication/replica_config_test.py suites/resource_limits/fdlimits_test.py
=============================================================================================== test session starts ================================================================================================
platform linux -- Python 3.6.8, pytest-3.4.2, py-1.5.3, pluggy-0.6.0 -- /usr/libexec/platform-python
cachedir: ../.pytest_cache
389-ds-base: 1.4.1.3-3.module+el8.1.0+3533+f8225121
nss: 3.41.0-5.el8
nspr: 4.20.0-2.el8
openldap: 2.4.46-9.el8
cyrus-sasl: not installed
FIPS: disabled
rootdir: /var/str/ds/dirsrvtests, inifile: pytest.ini
collected 75 items                                                                                                                                                                                                 

suites/ds_logs/ds_logs_test.py::test_check_default PASSED                                                                                                                                                    [  1%]
suites/ds_logs/ds_logs_test.py::test_plugin_set_invalid PASSED                                                                                                                                               [  2%]
suites/ds_logs/ds_logs_test.py::test_log_plugin_on PASSED                                                                                                                                                    [  4%]
suites/ds_logs/ds_logs_test.py::test_log_plugin_off PASSED                                                                                                                                                   [  5%]
suites/ds_logs/ds_logs_test.py::test_internal_log_server_level_0 PASSED                                                                                                                                      [  6%]
suites/ds_logs/ds_logs_test.py::test_internal_log_server_level_4 PASSED                                                                                                                                      [  8%]
suites/ds_logs/ds_logs_test.py::test_internal_log_level_260 PASSED                                                                                                                                           [  9%]
suites/ds_logs/ds_logs_test.py::test_internal_log_level_131076 PASSED                                                                                                                                        [ 10%]
suites/ds_logs/ds_logs_test.py::test_internal_log_level_516 PASSED                                                                                                                                           [ 12%]
suites/ds_logs/ds_logs_test.py::test_access_log_truncated_search_message SKIPPED                                                                                                                             [ 13%]
suites/paged_results/paged_results_test.py::test_search_success[6-5] PASSED                                                                                                                                  [ 14%]
suites/paged_results/paged_results_test.py::test_search_success[5-5] PASSED                                                                                                                                  [ 16%]
suites/paged_results/paged_results_test.py::test_search_success[5-25] PASSED                                                                                                                                 [ 17%]
suites/paged_results/paged_results_test.py::test_search_limits_fail[50-200-cn=config,cn=ldbm database,cn=plugins,cn=config-nsslapd-idlistscanlimit-100-UNWILLING_TO_PERFORM] PASSED                          [ 18%]
suites/paged_results/paged_results_test.py::test_search_limits_fail[5-15-cn=config-nsslapd-timelimit-20-UNAVAILABLE_CRITICAL_EXTENSION] PASSED                                                               [ 20%]
suites/paged_results/paged_results_test.py::test_search_limits_fail[21-50-cn=config-nsslapd-sizelimit-20-SIZELIMIT_EXCEEDED] PASSED                                                                          [ 21%]
suites/paged_results/paged_results_test.py::test_search_limits_fail[21-50-cn=config-nsslapd-pagedsizelimit-5-SIZELIMIT_EXCEEDED] PASSED                                                                      [ 22%]
suites/paged_results/paged_results_test.py::test_search_limits_fail[5-50-cn=config,cn=ldbm database,cn=plugins,cn=config-nsslapd-lookthroughlimit-20-ADMINLIMIT_EXCEEDED] PASSED                             [ 24%]
suites/paged_results/paged_results_test.py::test_search_sort_success PASSED                                                                                                                                  [ 25%]
suites/paged_results/paged_results_test.py::test_search_abandon PASSED                                                                                                                                       [ 26%]
suites/paged_results/paged_results_test.py::test_search_with_timelimit PASSED                                                                                                                                [ 28%]
suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[dns = "host-[redacted]-redhat.com"] PASSED                                                                         [ 29%]
suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[ip = "10.0.132.175"] PASSED                                                                                                               [ 30%]
suites/paged_results/paged_results_test.py::test_search_multiple_paging PASSED                                                                                                                               [ 32%]
suites/paged_results/paged_results_test.py::test_search_invalid_cookie[1000] PASSED                                                                                                                          [ 33%]
suites/paged_results/paged_results_test.py::test_search_invalid_cookie[-1] PASSED                                                                                                                            [ 34%]
suites/paged_results/paged_results_test.py::test_search_abandon_with_zero_size PASSED                                                                                                                        [ 36%]
suites/paged_results/paged_results_test.py::test_search_pagedsizelimit_success PASSED                                                                                                                        [ 37%]
suites/paged_results/paged_results_test.py::test_search_nspagedsizelimit[5-15-PASS] PASSED                                                                                                                   [ 38%]
suites/paged_results/paged_results_test.py::test_search_nspagedsizelimit[15-5-SIZELIMIT_EXCEEDED] PASSED                                                                                                     [ 40%]
suites/paged_results/paged_results_test.py::test_search_paged_limits[conf_attr_values0-ADMINLIMIT_EXCEEDED] PASSED                                                                                           [ 41%]
suites/paged_results/paged_results_test.py::test_search_paged_limits[conf_attr_values1-PASS] PASSED                                                                                                          [ 42%]
suites/paged_results/paged_results_test.py::test_search_paged_user_limits[conf_attr_values0-ADMINLIMIT_EXCEEDED] PASSED                                                                                      [ 44%]
suites/paged_results/paged_results_test.py::test_search_paged_user_limits[conf_attr_values1-PASS] PASSED                                                                                                     [ 45%]
suites/paged_results/paged_results_test.py::test_ger_basic PASSED                                                                                                                                            [ 46%]
suites/paged_results/paged_results_test.py::test_multi_suffix_search PASSED                                                                                                                                  [ 48%]
suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[None] PASSED                                                                                                                [ 49%]
suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[-1] PASSED                                                                                                                  [ 50%]
suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[1000] PASSED                                                                                                                [ 52%]
suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_failure[0] PASSED                                                                                                                   [ 53%]
suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_failure[1] PASSED                                                                                                                   [ 54%]
suites/replication/replica_config_test.py::test_replica_num_add[nsDS5ReplicaType--1-4-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED                                  [ 56%]
suites/replication/replica_config_test.py::test_replica_num_add[nsDS5Flags--1-2-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED                                        [ 57%]
suites/replication/replica_config_test.py::test_replica_num_add[nsDS5ReplicaId-0-65535-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED                                 [ 58%]
suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaPurgeDelay--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED          [ 60%]
suites/replication/replica_config_test.py::test_replica_num_add[nsDS5ReplicaBindDnGroupCheckInterval--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 61%]
suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaTombstonePurgeInterval--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 62%]
suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaProtocolTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED     [ 64%]
suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaReleaseTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED      [ 65%]
suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaBackoffMin-0-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-3] PASSED           [ 66%]
suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaBackoffMax-0-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] PASSED           [ 68%]
suites/replication/replica_config_test.py::test_replica_num_modify[nsDS5Flags--1-2-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED                                     [ 69%]
suites/replication/replica_config_test.py::test_replica_num_modify[nsds5ReplicaPurgeDelay--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED       [ 70%]
suites/replication/replica_config_test.py::test_replica_num_modify[nsDS5ReplicaBindDnGroupCheckInterval--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 72%]
suites/replication/replica_config_test.py::test_replica_num_modify[nsds5ReplicaTombstonePurgeInterval--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 73%]
suites/replication/replica_config_test.py::test_replica_num_modify[nsds5ReplicaProtocolTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED  [ 74%]
suites/replication/replica_config_test.py::test_replica_num_modify[nsds5ReplicaReleaseTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED   [ 76%]
suites/replication/replica_config_test.py::test_replica_num_modify[nsds5ReplicaBackoffMin-0-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-3] PASSED        [ 77%]
suites/replication/replica_config_test.py::test_replica_num_modify[nsds5ReplicaBackoffMax-0-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] PASSED        [ 78%]
suites/replication/replica_config_test.py::test_agmt_num_add[nsds5ReplicaPort-0-65535-9999999999999999999999999999999999999999999999999999999999999999999-invalid-389] xfail                                 [ 80%]
suites/replication/replica_config_test.py::test_agmt_num_add[nsds5ReplicaTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] XPASS                 [ 81%]
suites/replication/replica_config_test.py::test_agmt_num_add[nsds5ReplicaBusyWaitTime--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] XPASS            [ 82%]
suites/replication/replica_config_test.py::test_agmt_num_add[nsds5ReplicaSessionPauseTime--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] XPASS        [ 84%]
suites/replication/replica_config_test.py::test_agmt_num_add[nsds5ReplicaFlowControlWindow--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] XPASS       [ 85%]
suites/replication/replica_config_test.py::test_agmt_num_add[nsds5ReplicaFlowControlPause--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] XPASS        [ 86%]
suites/replication/replica_config_test.py::test_agmt_num_add[nsds5ReplicaProtocolTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] XPASS         [ 88%]
suites/replication/replica_config_test.py::test_agmt_num_modify[nsds5ReplicaPort-0-65535-9999999999999999999999999999999999999999999999999999999999999999999-invalid-389] xfail                              [ 89%]
suites/replication/replica_config_test.py::test_agmt_num_modify[nsds5ReplicaTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] xfail              [ 90%]
suites/replication/replica_config_test.py::test_agmt_num_modify[nsds5ReplicaBusyWaitTime--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] xfail         [ 92%]
suites/replication/replica_config_test.py::test_agmt_num_modify[nsds5ReplicaSessionPauseTime--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] xfail     [ 93%]
suites/replication/replica_config_test.py::test_agmt_num_modify[nsds5ReplicaFlowControlWindow--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] xfail    [ 94%]
suites/replication/replica_config_test.py::test_agmt_num_modify[nsds5ReplicaFlowControlPause--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] xfail     [ 96%]
suites/replication/replica_config_test.py::test_agmt_num_modify[nsds5ReplicaProtocolTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] xfail      [ 97%]
suites/replication/replica_config_test.py::test_same_attr_yields_same_return_code SKIPPED                                                                                                                    [ 98%]
suites/resource_limits/fdlimits_test.py::test_fd_limits PASSED                                                                                                                                               [100%]

=========================================================================== 59 passed, 2 skipped, 8 xfailed, 6 xpassed in 233.04 seconds ===========================================================================

rebased onto 4661c79

4 years ago

Pull-Request has been merged by vashirov

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3536

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago