Skip to content

Conversation

@phillxnet
Copy link
Member

  • Add missing mock in test_commands.py re enable_quota() & get_unlocked_luks_containers_uuids().
  • add missing mock in test_email_client.py re update_master().
  • add missing mock in test_samba.py re refresh_smb_discovery().
  • add missing mocks in test_snmp.py re systemd interaction.
  • add missing mock in test_network.py re nmcli call.
  • add missing mock in test_snapshot.py re refresh_nfs_exports.
  • add missing mock in test_config_backup.py re file expectation.
  • add missing mock in test_disks.py re dmsetup call.
  • revise & update test_user.py re fixtures use. Re-enables a number of remarked-out user tests awaiting this revision. Improves readability, scope, and specificity re test names.

Includes improved instructions on running each test set for all test files modified.

Fixes #2633

- Add missing mock in test_commands.py re enable_quota()
& get_unlocked_luks_containers_uuids().
- add missing mock in test_email_client.py re update_master().
- add missing mock in test_samba.py re refresh_smb_discovery().
- add missing mocks in test_snmp.py re systemd interaction.
- add missing mock in test_network.py re nmcli call.
- add missing mock in test_snapshot.py re refresh_nfs_exports.
- add missing mock in test_config_backup.py re file expectation.
- add missing mock in test_disks.py re dmsetup call.
- revise & update test_user.py re fixtures use.
Re-enables a number of remarked-out user tests awaiting this revision.
Improves readability, scope, and specificity re test names.
@phillxnet
Copy link
Member Author

The testing for this pull request is to be done against the rockstor-rpmbuid work done against issue:

"Improve BuildRequires use": rockstor/rockstor-rpmbuild#28

As this pr is a spin-off from work in-progress done against the above issue which aims to reduce our BuildRequires: ergo the test improvements here that otherwise created false rpmbuild dependencies due to inappropriate OS sensitivity during test rurns.

@phillxnet
Copy link
Member Author

See the following rockstor-rpmbuild pull request comment re test builds including this patch to rockstor-core:
rockstor/rockstor-rpmbuild#39 (comment)

We now expect the following output from a %check rpmbuild scriptlet:

+ poetry run django-admin test
......................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 262 tests in 49.090s

@phillxnet phillxnet merged commit b58cc3e into rockstor:testing Aug 2, 2023
@phillxnet phillxnet deleted the 2633_Improve_OS_independence_re_unit_tests branch August 2, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant