#8795 Remove dependency from tests on ipaserver package/modules
Opened 2 years ago by kaleem. Modified 2 years ago

Request for enhancement

At the moment tests from test_integration are dependent on modules from freeipa/ipaserver package and following is the list of those tests .

test_commands.py:from ipaserver.install.installutils import realm_to_serverid
test_commands.py:# from ipaserver.masters
test_ipahealthcheck.py:from ipaserver.install.installutils import resolve_ip_addresses_nss
test_upgrade.py:from ipaserver.install import bindinstance
test_upgrade.py:from ipaserver.install.sysupgrade import STATEFILE_FILE
test_upgrade.py:                "from ipaserver.install import krainstance; "
test_installation.py:from ipaserver.install import krainstance
test_uninstallation.py:# from ipaserver.install.dsinstance
test_acme.py:from ipaserver.install import cainstance

Affected tests should be modified because of removal of this dependency on ipaserver modules/packages.


@kaleem what is the motivation for removing ipaserver imports from ipatests?

I'd also add lib389 dependency, because of the same reasons.
@rcritten we have issues with running these tests downstream. The plan is not to remove the imports per se, but rather to move required code to other, better accessible location.

Metadata Update from @mpolovka:
- Issue assigned to mpolovka

2 years ago

Metadata Update from @mpolovka:
- Issue tagged with: rfe, tests

2 years ago

This doesn't explain why ipaserver cannot be imported.

One of reasons can be seen in https://pagure.io/freeipa/issue/8620 where we have a real trouble running mixed OS configurations for test controller/test executor.

I guess my point is that the text of the ticket lacks any of this reasoning. It just says what must be done but not why ipaserver cannot be imported. If other packages (ipapython, ipalib, etc) can be imported then please explain why ipaserver cannot. I can see why 8620 might be relevant to this use-case but none of the things modified there are mentioned in the initial text AFAICT.

@rcritten I must also admit I am not sure as to why remove ipaserver dependency. R
I've found out, that in order to remove external dependency on lib389 and move relevant parts of the code into common accessible place, I would have to copy-paste and re-resolve about 24 separate files. These files, however, would have to be manually kept in sync with lib389 package, which would again create lot of work. Thus, I've decided to copy-paste one dictionary on which one of the tests truly depends.
I think we should properly discuss removing ipaserver dependency, because such extensive dependency resolution won't be easy. Unless something eludes me.

Metadata Update from @mpolovka:
- Issue untagged with: rfe

2 years ago

master:

  • 3189e50 ipatests: test_installation: move tracking_reqs dependency to ipalib constants ipaserver: krainstance: utilize moved tracking_reqs dependency

ipa-4-9:

  • e5df4dc ipatests: test_installation: move tracking_reqs dependency to ipalib constants ipaserver: krainstance: utilize moved tracking_reqs dependency

Login to comment on this ticket.

Metadata