Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port backend_test.py lib389 test to the new DSLdapObject implementation #2465

Closed
389-ds-bot opened this issue Sep 13, 2020 · 6 comments
Closed
Labels
closed: fixed Migration flag - Issue
Milestone

Comments

@389-ds-bot
Copy link

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/49406


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:

  • test_lint - check that we can detect missing mapping tree entries for the backend (take a look at "def _lint_mappingtree(self):" at lib389/backend.py)
  • test_create_sample_entries - check that entries are created with a valid input; check that entries aren't created with an invalid input;
  • test_get_monitor - check that we get the right object;
  • test_get_indexes - check that we get the right object.
  • test_delete_valid, test_delete_invalid - rework to test_get_valid and test_get_invalid.
  • test_delete - add the test case
@389-ds-bot 389-ds-bot added the closed: fixed Migration flag - Issue label Sep 13, 2020
@389-ds-bot 389-ds-bot added this to the 1.4 backlog milestone Sep 13, 2020
@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2017-10-26 18:03:04

Metadata Update from @mreynolds389:

  • 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

@389-ds-bot
Copy link
Author

Comment from akshayshivekar at 2017-11-13 09:40:27

0001-Issue-49406-Port-backend_test.py-test-to-DSLdapObjec.patch

@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2017-11-14 04:32:34

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, @droideck may have some more comments,

Thanks!

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2018-04-18 16:22:03

Metadata Update from @droideck:

  • Issue assigned to droideck

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2018-04-25 12:09:38

530a2db..c9632e8 master -> origin/master

@389-ds-bot
Copy link
Author

Comment from spichugi (@droideck) at 2018-04-25 12:09:54

Metadata Update from @droideck:

  • Issue close_status updated to: fixed
  • Issue status updated to: Closed (was: Open)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: fixed Migration flag - Issue
Projects
None yet
Development

No branches or pull requests

1 participant