mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Implement cloudforms license
This is a special license that is triggered in the presence of two directories: - /opt/rh/cfme-appliance - /opt/rh/cfme-gemset and the rpms - cfme - cfme-appliance - cfme-gemset All of which I'm assured are responsible for validating that this is indeed an enterprise cloudforms environment. When these are present then a license is used that is near perpetual, allows for a stupid large number of instances, and turns on all features
This commit is contained in:
@@ -92,3 +92,15 @@ def test_expired_licenses():
|
|||||||
|
|
||||||
assert vdata['compliant'] is False
|
assert vdata['compliant'] is False
|
||||||
assert vdata['grace_period_remaining'] > 0
|
assert vdata['grace_period_remaining'] > 0
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.django_db
|
||||||
|
def test_cloudforms_license(mocker):
|
||||||
|
with mocker.patch('awx.main.task_engine.TaskEnhancer._check_cloudforms_subscription', return_value=True):
|
||||||
|
task_enhancer = TaskEnhancer()
|
||||||
|
vdata = task_enhancer.validate_enhancements()
|
||||||
|
assert vdata['compliant'] is True
|
||||||
|
assert vdata['subscription_name'] == "Cloudforms License"
|
||||||
|
assert vdata['available_instances'] == 9999999
|
||||||
|
assert vdata['license_type'] == 'enterprise'
|
||||||
|
assert vdata['features']['ha'] is True
|
||||||
|
|||||||
Reference in New Issue
Block a user