Skip to content

Commit

Permalink
Issue 6312 - In branch 2.5, healthcheck report an invalid warning reg…
Browse files Browse the repository at this point in the history
…arding BDB deprecation

Bug description:
	during healthcheck, _lint_backend_implementation checks that
	the instance is not running a BDB backend.
	This check only applies for instance after 3.0.0

Fix description:
	If the instance is newer than 3.0.0 the health check
	just returns

relates: 389ds#6312

Reviewed by:
  • Loading branch information
tbordaz committed Aug 28, 2024
1 parent 4de8658 commit ea37720
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions dirsrvtests/tests/suites/healthcheck/healthcheck_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ def create_dummy_db_files(inst, backend_type):
f.write('') # Create an empty file for simplicity


@pytest.mark.skipif(ds_is_older("3.0.0"), reason="mdb and bdb are both supported")
def test_lint_backend_implementation_wrong_files(topology_st):
"""Test the lint for backend implementation wrong files
Expand Down
4 changes: 2 additions & 2 deletions src/lib389/lib389/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from lib389.properties import BACKEND_OBJECTCLASS_VALUE, BACKEND_PROPNAME_TO_ATTRNAME, BACKEND_CHAIN_BIND_DN, \
BACKEND_CHAIN_BIND_PW, BACKEND_CHAIN_URLS, BACKEND_PROPNAME_TO_ATTRNAME, BACKEND_NAME, \
BACKEND_SUFFIX, BACKEND_SAMPLE_ENTRIES, TASK_WAIT
from lib389.utils import normalizeDN, ensure_str, assert_c
from lib389.utils import normalizeDN, ensure_str, assert_c, ds_is_newer
from lib389 import Entry

# Need to fix this ....
Expand Down Expand Up @@ -513,7 +513,7 @@ def _lint_mappingtree(self):

def _lint_backend_implementation(self):
backend_impl = self._instance.get_db_lib()
if backend_impl == 'bdb':
if backend_impl == 'bdb' and ds_is_newer('3.0.0', instance=self._instance):
result = DSBLE0006
result['items'] = [self.lint_uid()]
yield result
Expand Down

0 comments on commit ea37720

Please sign in to comment.