Fix tests and test provider for real license format
This commit is contained in:
parent
7f358cb2bd
commit
2eabf1a291
4 changed files with 436 additions and 97 deletions
|
@ -220,7 +220,6 @@ class License(object):
|
|||
# We assume monthly license unless specified otherwise
|
||||
return Expiration(ExpirationType.monthly, service_end, MONTHLY_GRACE_PERIOD)
|
||||
|
||||
|
||||
def validate(self, config):
|
||||
""" Returns a list of EntitlementValidationResult objects, one per requirement.
|
||||
"""
|
||||
|
@ -284,8 +283,10 @@ class LicenseValidator(Thread):
|
|||
synchronization primitive.
|
||||
"""
|
||||
def __init__(self, config_provider, *args, **kwargs):
|
||||
config = config_provider.get_config() or {}
|
||||
|
||||
self._config_provider = config_provider
|
||||
self._entitlement_requirements = _gen_entitlement_requirements(config_provider.get_config())
|
||||
self._entitlement_requirements = _gen_entitlement_requirements(config)
|
||||
|
||||
# multiprocessing.Value does not ensure consistent write-after-reads, but we don't need that.
|
||||
self._license_is_insufficient = multiprocessing.Value(c_bool, True)
|
||||
|
|
Reference in a new issue