mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 12:55:04 -02:30
add back in support of towervars lost in merge
This commit is contained in:
@@ -13,6 +13,28 @@ from awx.main.models import (
|
||||
from awx.main.utils.filters import SmartFilter
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
class TestInventoryScript:
|
||||
|
||||
def test_hostvars(self, inventory):
|
||||
inventory.hosts.create(name='ahost', variables={"foo": "bar"})
|
||||
assert inventory.get_script_data(
|
||||
hostvars=True
|
||||
)['_meta']['hostvars']['ahost'] == {
|
||||
'foo': 'bar'
|
||||
}
|
||||
|
||||
def test_towervars(self, inventory):
|
||||
host = inventory.hosts.create(name='ahost')
|
||||
assert inventory.get_script_data(
|
||||
hostvars=True,
|
||||
towervars=True
|
||||
)['_meta']['hostvars']['ahost'] == {
|
||||
'remote_tower_enabled': 'true',
|
||||
'remote_tower_id': host.id
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
class TestSCMUpdateFeatures:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user