Today we rely on a number of perl tools for test execution. This includes setup-ds.pl, remove-ds.pl, dbgen.pl and others.
This ticket adds support for lib389 to be able to create, remove, and generate dbs for instances that have no perl components. This is an important milestone to decoupling our perl tools from the main server code and moving towards a pure python implementation.
https://pagure.io/389-ds-base/issue/49348 is enabled by this ticket.
Metadata Update from @firstyear: - Custom field Origin adjusted to None - Custom field Review Status adjusted to None
<img alt="0001-Ticket-88-python-install-and-remove-for-tests.patch" src="/lib389/issue/raw/files/a1201152a0861b50098aa7f84c83e7bc201334332d5fc42ca75319b96883164e-0001-Ticket-88-python-install-and-remove-for-tests.patch" />
Metadata Update from @firstyear: - Custom field Review Status adjusted to review (was: None)
You have "NameError: global name 'ensure_str' is not defined" in lib389/idm/group.py
Also this can be related to your patch, but I am not sure:
def test_ldif2db_db2ldif_repl(topology_be_latest): standalone = topology_be_latest.standalone standalone.stop() args = FakeArgs() args.backend = 'userRoot' args.ldif = os.path.join(standalone.get_ldif_dir(), "test.ldif") args.encrypt = False args.replication = False args.archive = os.path.join(standalone.get_ldif_dir(), "test.ldif") # Stop the instance > dbtasks_db2ldif(standalone, topology_be_latest.logcap.log, args) lib389/tests/cli/ctl_dbtasks_test.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inst = <lib389.DirSrv object at 0x38b79d0>, log = <logging.Logger object at 0x3985690> args = <lib389.cli_base.FakeArgs object at 0x3899b90> def dbtasks_db2ldif(inst, log, args): > inst.db2ldif(bename=args.backend, encrypt=args.encrypted, repl_data=args.replication, outputfile=args.ldif, suffixes=None, excludeSuffixes=None) E AttributeError: 'FakeArgs' object has no attribute 'encrypted'
Besides that, the code looks good. Ack from my side. I'll give a time for the rest of the team to review it.
That error looks like something from @ilias95 so maybe he can investigate? It's not related to this ticket.
I have added the include as requested. I'll ask @mreynolds to have a look too!
Yes, it is a different issue I guess. I haven't touched this code before, but it just seems there is a typo:
https://pagure.io/lib389/blob/master/f/lib389/tests/cli/ctl_dbtasks_test.py#_42 https://pagure.io/lib389/blob/master/f/lib389/cli_ctl/dbtasks.py#_23
We assign to args.encrypt, but then try to access args.encrypted instead.
Do you mind fixing this in a new issue?
Sure, I fixed this in #93.
Metadata Update from @spichugi: - Custom field Review Status adjusted to ack (was: review)
Ok, we still have a lot of failures in the tests that we can fix in the different tickets. The patch you prepared, I think, is okay. (after fixing NameError in lib389/idm/group.py)
Thanks!
Thanks @spichugi !
commit 2a50b9d To ssh://git@pagure.io/lib389.git b732af9..2a50b9d master -> master
Metadata Update from @firstyear: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.