-
Notifications
You must be signed in to change notification settings - Fork 139
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
Unit test maintenance re legacy disparity #2243
Comments
I am currently working on this issue. |
Current state as of 4.0.5-0 tag (Release Candidate 6)
|
We have 2 failures in the user section which seem to relate only to differing default users:
details:
|
2 failed in commands likely due to missing files associated with yum auto update:
details
|
1 failing in user group:
details
Don't see how this passed previously but haven't really looked yet. |
The single error looks to be from changes we've made in Samba code maybe:
details:
|
And the last failure is in a new networking test that is suspected as having incomplete mocking re docker, or a reliance on the test system running docker or the like.
details:
|
Getting there ...
|
Only the recent added network failure one to go now:
Details:
|
Re-establish prior CentOS baseline of all existing tests passing. Summary of changes - Delete of existing, non excluded user 'games' fails as non existent in openSUSE base. Replace with non excluded 'lp' user that does exist.
for nobody (CentOS) is now available. Change to 65534 which is openSUSE uid for user nobody. rockstor#2243
based. Disable/Enable tests failed with "No such file or directory: '/etc/yum/yum-cron.conf'" but are intended as API level tests. Mock low level auto_update() and add TODO to test_pkg_mgmt.py for the appropriate low level test once we migrate this functionality to a zypper equivalent. This way we preserve & test the presence of the existing API. rockstor#2243
actually exist. Substitute with gid of users (100) which does exist in our new openSUSE base. rockstor#2243
user gid existing. This same gid does not exist in the new openSUSE base, resulting in a an exception. Fix by mocking a fake group name return via getgrgid. rockstor#2243
@FroggyFlox I'll squash these commits just prior to pr submission as all fairly small changes but pushed for now for backup, just in case. |
@phillxnet, I believe I've figured out why the def test_get_con_config(self):
"""
This tests for correct parsing of nmcli connection config by get_con_config(),
which should return a dict with detailed config for each network connection detected.
"""
# Mock and patch docker-specific calls
self.patch_docker_status = patch("system.network.docker_status")
self.mock_docker_status = self.patch_docker_status.start()
self.mock_docker_status.return_value = True
self.patch_dnets = patch("system.network.dnets")
self.mock_dnets = self.patch_dnets.start()
self.patch_dnet_inspect = patch("system.network.dnet_inspect")
self.mock_dnet_inspect = self.patch_dnet_inspect.start() Note the first 3 lines patching and mocking rockstor-core/src/rockstor/system/network.py Line 206 in 1223360
I now get:
|
@FroggyFlox Nice. Thanks for that; Ill do the same here and get the pr prepared. |
Re-establish prior CentOS baseline of all existing tests passing. Summary of changes - Delete of existing, non excluded user 'games' fails as non existent in openSUSE base. Replace with non excluded 'lp' user that does exist. - Creation of new user with existing uid test failed as prior uid of 99 for nobody (CentOS) is now available. Change to 65534 which is openSUSE uid for user nobody. - Auto_update (legacy yum-based) is now defunct: we are now zypper based. Disable/Enable tests failed with "No such file or directory: '/etc/yum/yum-cron.conf'" but are intended as API level tests. Mock low level auto_update() and add TODO to test_pkg_mgmt.py for the appropriate low level test once we migrate this functionality to a zypper equivalent. This way we preserve & test the presence of the existing API. - Group create with pre-existing group id fails as group id used did not actually exist. Substitute with gid of users (100) which does exist in our new openSUSE base. - Prior samba test created a temporary user that relied on a real system user gid existing. This same gid does not exist in the new openSUSE base, resulting in a an exception. Fix by mocking a fake group name return via getgrgid. - Add missing docker_status() mocking that was failing a more recently added low level network test: test_get_con_config(), due to system docker state. Thanks to @FroggyFlox on GitHub for this fix
Looks like we are there now:
This is good to see; thanks. I've removed the remote (GitHub) branch, squashed all commits, and re-pushed the branch ready for pull request preparation. |
…_legacy_disparity Unit test maintenance re legacy disparity. Fixes #2243
Prior to embarking on our Rockstor 4 release candidates the existing unit tests on our prior CentOS base were modified to have zero failures/errors in the following pull request:
"remark out all currently failing unit tests. Fixes #2137" #2153
In the mean time we have added additional unit tests and still have some existing failures in prior tests on the non legacy 'Built on openSUSE' endeavour. This issue is to address this disparity by returning our unit test status to that of our prior OS base with the intention of establishing this state prior to our final Stable 4 release.
The text was updated successfully, but these errors were encountered: