On older versions of DS some tests are failing because features are not implemented. We need to mark these tests with skip fixture, so they won't be executed.
attachment 0001-Ticket-49057-Fix-tests-failures-on-older-versions-of.patch
There are failures left that are either bugs in the DS or in the test. It needs additional investigation.
Test report with this patch: https://fedorapeople.org/~vashirov/ds/reports/el6/1.2.11.15-85.el6.html
I think that this is great, and we should be making it default for new tests to check such versions if possible.
Thanks!
Rebased patch 0001-Ticket-49057-Fix-tests-failures-on-older-versions-of-v2.patch
Looks good!
Sorry, I have to confess that I haven't checked each version passed to skipif... But it looks correct in the quick scan. {{{ pytestmark = pytest.mark.skipif(ds_is_older('1.x.x'), reason="Not implemented") ^^^^^ }}}
I'm not sure about this.
{{{ if ds_paths.version < '1.3': 425 nsinactivate = '%s/ns-inactivate.pl' % inst_dir 426 nsinactivate_cmd = [nsinactivate, '-D', DN_DM, '-w', PASSWORD, '-I', BINDDN] 427 else: 428 nsinactivate = '%s/sbin/ns-inactivate.pl' % topology.standalone.prefix 429 nsinactivate_cmd = [nsinactivate, '-Z', 'standalone', '-D', DN_DM, '-w', PASSWORD, '-I', BINDDN] }}}
Code like this frightens me. Versions less that 1.3 (ie 1.2) should have the sbin scripts in place. So I don't see why you need to use the instance version instead.
As well, you have access to ds_paths from 1.2, so can't you use that to get the sbin / instance dir if needed?
With the 1.3 version, you should be using either ds_paths.sbin_dir, or standalone.get_sbin_dir().
Remember, that the sbin dir MAY NOT be relative to the prefix. People can (and have) changed it in installs...
Replying to [comment:8 firstyear]:
I'm not sure about this. {{{ if ds_paths.version < '1.3': 425 nsinactivate = '%s/ns-inactivate.pl' % inst_dir 426 nsinactivate_cmd = [nsinactivate, '-D', DN_DM, '-w', PASSWORD, '-I', BINDDN] 427 else: 428 nsinactivate = '%s/sbin/ns-inactivate.pl' % topology.standalone.prefix 429 nsinactivate_cmd = [nsinactivate, '-Z', 'standalone', '-D', DN_DM, '-w', PASSWORD, '-I', BINDDN] }}} Code like this frightens me. Versions less that 1.3 (ie 1.2) should have the sbin scripts in place. So I don't see why you need to use the instance version instead. Except they don't: {{{
Code like this frightens me. Versions less that 1.3 (ie 1.2) should have the sbin scripts in place. So I don't see why you need to use the instance version instead. Except they don't: {{{
/usr/lib64/dirsrv/slapd-rhel6ds/ns-activate.pl /usr/share/dirsrv/script-templates/template-ns-activate.pl
/usr/share/dirsrv/script-templates/template-ns-activate.pl }}} (this is taken from RHEL6 with instance rhel6ds installed).
As well, you have access to ds_paths from 1.2, so can't you use that to get the sbin / instance dir if needed? I'm getting instance dir from there: {{{ inst_dir = ds_paths.inst_dir }}} With the 1.3 version, you should be using either ds_paths.sbin_dir, or standalone.get_sbin_dir(). Right, I'll fix that, since topology.standalone.prefix is no longer valid (missed that during the rebase). Remember, that the sbin dir MAY NOT be relative to the prefix. People can (and have) changed it in installs... It will be in case of RHEL/Fedora and official rpm installs. Other use cases on different distros/OSes are not a primary concern for QE, since it's not supported by RH.
As well, you have access to ds_paths from 1.2, so can't you use that to get the sbin / instance dir if needed? I'm getting instance dir from there: {{{ inst_dir = ds_paths.inst_dir }}}
Right, I'll fix that, since topology.standalone.prefix is no longer valid (missed that during the rebase). Remember, that the sbin dir MAY NOT be relative to the prefix. People can (and have) changed it in installs... It will be in case of RHEL/Fedora and official rpm installs. Other use cases on different distros/OSes are not a primary concern for QE, since it's not supported by RH.
topology.standalone.prefix
attachment 0001-Ticket-49057-Fix-tests-failures-on-older-versions-of-v3.patch
You have my ack, looks good. Thanks for clearing this up.
Thank you Noriko and William!
commit ad23dc8 To ssh://git.fedorahosted.org/git/389/ds.git dccf277..ad23dc8 master -> master
Metadata Update from @vashirov: - Issue set to the milestone: CI test 1.0
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 issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/2116
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.