Port the test cases from lib389/tests/backend_test.py to new Backends(DSLdapObject).
Legacy object test cases should be at lib389/tests/backendLegacy_test.py test_create can be ported with the same structure, but the docstrings should be adjusted to the proper format.
Additionally, we need to test the next methods: lint, create_sample_entries, get_monitor, get_indexes. Just test the very basic behavior:
Metadata Update from @mreynolds: - Custom field component adjusted to None - Custom field origin adjusted to None - Custom field reviewstatus adjusted to None - Custom field type adjusted to None - Custom field version adjusted to None - Issue set to the milestone: 1.4 backlog
<img alt="0001-Issue-49406-Port-backend_test.py-test-to-DSLdapObjec.patch" src="/389-ds-base/issue/raw/files/4fa1d77477d2226f8e76c4bdec5583fbf3a5df78c4ea3632b7d1c652ea030966-0001-Issue-49406-Port-backend_test.py-test-to-DSLdapObjec.patch" />
Hey there,
388 + backend = topology_st.standalone.backends.create(properties={BACKEND_SUFFIX: NEW_SUFFIX_1_RDN, 389 + BACKEND_NAME: BACKEND_NAME_1})
Avoid the use of backend_suffix and backend_name : they are there for legacy compat, but they should be removed.
Use "nsslapd-suffix" and "cn" instead :)
429 + ents = topology_st.standalone.backends.list()
I don't like this syntax either. While it can be convinient to say "topo.backends..." I think it's cleaner to say:
backends = Backends(topology.standalone) backends.list()
But that's my personal preference.
840 + assert backend_monitor.normalizeddncachetries == monitor.normalizeddncachetries
Don't check this, because the value could CHANGE in the background due to the way this monitor works. Check the .dn is the same is sufficent.
Otherwise looks pretty good, @spichugi may have some more comments,
Thanks!
Metadata Update from @spichugi: - Issue assigned to spichugi
530a2db..c9632e8 master -> origin/master
Metadata Update from @spichugi: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
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/2465
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.