1
0
mirror of https://github.com/quay/quay.git synced 2026-01-27 18:42:52 +03:00
Files
quay/workers/test
OpenShift Cherrypick Robot 96b4b34881 [redhat-3.14] workers(quotaregistrysize): added to run quotasizeworker when SUPERUSERS are retrieved from LDAP (PROJQUAY-8086) (#4283)
* added check to run quotasizeworker when SUPERUSERS are retrieved from LDAP and not static listed

* fixed condition to fail if feature enable but no superusers and no ldap filter

* Added pytest for the quotaregistrysizeworker. Added the other checks in the worker logic as well. Since the original test is only on checking if we called the instance, the wrapped logic before had to be added into the check.

We expect with the check that:
* if we are in ACCOUNT_RECOVERY_MODE, we do not execute the calculation
* if we do not have QUOTA_MANAGEMENT enabled, we do not execute the
  calculation
* if we do not have SUPER_USERS, we do not execute the calculation
* if we do have LDAP_SUPERUSER_FILTER and the other criterias are not
  matching, we do execute the calculation

* added isort and flake8 checks on tests

* app is already defined by another import

* fixed wrong Recovery check for quotasize calculation call

* fixed wrong Quota check for quotasize calculation call

---------

Co-authored-by: Michaela Lang <milang@redhat.com>
2025-09-15 14:43:54 -04:00
..