#49590 Issue 49584 - Fix issues with paged_results test suite
Closed 3 years ago by spichugi. Opened 6 years ago by spichugi.
spichugi/389-ds-base pagedresults_fix  into  master

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

  # See LICENSE for details.

  # --- END COPYRIGHT BLOCK ---

  #

+ import socket

  from random import sample

  

  import pytest
@@ -42,6 +43,9 @@ 

  NEW_BACKEND_1 = 'parent_base'

  NEW_BACKEND_2 = 'child_base'

  

+ HOSTNAME = socket.getfqdn()

+ IP_ADDRESS = socket.gethostbyname(HOSTNAME)

+ 

  

  @pytest.fixture(scope="module")

  def test_user(topology_st, request):
@@ -500,8 +504,8 @@ 

  

  

  @pytest.mark.parametrize('aci_subject',

-                          ('dns = "localhost.localdomain"',

-                           'ip = "::1" or ip = "127.0.0.1"'))

+                          ('dns = "{}"'.format(HOSTNAME),

+                           'ip = "{}"'.format(IP_ADDRESS)))

  def test_search_dns_ip_aci(topology_st, test_user, aci_subject):

      """Verify that after performing multiple simple paged searches

      to completion on the suffix with DNS or IP based ACI

@@ -80,7 +80,6 @@ 

              elif role != ReplicaRole.STANDALONE:

                  raise AssertionError("Invalid request to make suffix-less replicated environment")

  

- 

              instance.allocate(args_instance)

  

              instance_exists = instance.exists()

Bug Description: The test fails because the instance now uses
hostname for ldap URL but the ACI is set to localhost URL.

Fix description: Get FQDN and IP addresses of the machine
and use them for ACI creation.

https://pagure.io/389-ds-base/issue/49584

Reviewed by: ?

rebased onto c00ef65

6 years ago

Pull-Request has been merged by spichugi

6 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/2649

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