#50469 Issue 49997 - Add a new CI test case
Closed 3 years ago by spichugi. Opened 4 years ago by aadhikari.
aadhikari/389-ds-base new-suffix-test  into  master

@@ -403,6 +403,35 @@ 

          user_m1.delete()

  

  

+ def test_suffix_exists(topo_tls_ldapi):

+     """Check if wrong suffix is provided, server is giving Error: Failed

+     to validate suffix.

+ 

+     :id: ce75debc-c07f-4e72-8787-8f99cbfaf1e2

+     :setup: Two master replication

+     :steps:

+         1. Run ds-replcheck with wrong suffix (Non Existing)

+     :expectedresults:

+         1. It should be unsuccessful

+     """

+     m1 = topo_tls_ldapi.ms["master1"]

+     m2 = topo_tls_ldapi.ms["master2"]

+     ds_replcheck_path = os.path.join(m1.ds_paths.bin_dir, 'ds-replcheck')

+ 

+     if ds_is_newer("1.4.1.2"):

+         tool_cmd = [ds_replcheck_path, 'online', '-b', 'dc=test,dc=com', '-D', DN_DM, '-w', PW_DM,

+                     '-m', 'ldaps://{}:{}'.format(m1.host, m1.sslport),

+                     '-r', 'ldaps://{}:{}'.format(m2.host, m2.sslport)]

+     else:

+         tool_cmd = [ds_replcheck_path, '-b', 'dc=test,dc=com', '-D', DN_DM, '-w', PW_DM,

+                     '-m', 'ldaps://{}:{}'.format(m1.host, m1.sslport),

+                     '-r', 'ldaps://{}:{}'.format(m2.host, m2.sslport)]

+ 

+     result1 = subprocess.Popen(tool_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8')

+     result = result1.communicate()

+     assert "Failed to validate suffix" in result[0]

+ 

+ 

  if __name__ == '__main__':

      # Run isolated

      # -s for DEBUG mode

Bug Description: If the suffix provided in the command line does not exist or it's
not replicated, we have an error message that it's regarding the RUV

Fix Description: Added a test case that will validate if a wrong suffix is passed then
a proper error message is displayed or not.

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

Review by: ???

root@fedora29-aadhikar1 ds_tools]# ds-replcheck
No action provided, here is some --help.
usage: ds-replcheck [-h] [-v] {state,online,offline} ...

[root@fedora29-aadhikar1 ds_tools]# rpm -qa | grep 389
389-ds-base-libs-1.4.0.23-1.fc29.x86_64
python3-lib389-1.4.0.23-1.fc29.noarch
389-ds-base-legacy-tools-1.4.0.23-1.fc29.x86_64
389-ds-base-1.4.0.23-1.fc29.x86_64
389-ds-base-snmp-1.4.0.23-1.fc29.x86_64
cockpit-389-ds-1.4.0.23-1.fc29.noarch

Not sure on which version we have this change, also I see in the test above it's 1.4.1.2, must be missing something.

I tried using check_output but was not able to get the exact solution for this, not sure what would be the best way, please suggest?

rebased onto 33623d1bd13addc89717c5df2c96e770bbee041f

4 years ago

rebased onto 043043f5b9a8db4a92e515108df714610a2e8f96

4 years ago

rebased onto 261a128e0b0f183a503478a910c6df650e203ab5

4 years ago

rebased onto 818d90d3bcd1042ee7dee7daae93a018a98fee9b

4 years ago

Only tool_cmd string construction needs to be in if statement, the rest is the same.

Please update your commit message to have 'Relates' before the issue URL.

rebased onto 90d38c83d7b427ecb8322407074d9c350ef16799

4 years ago

rebased onto 858275cf4644734071fa421fa5de06818182f3a7

4 years ago

rebased onto 70ba6e3

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/3526

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
Metadata