mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 19:37:38 -02:30
Primary development of inventory plugins, partial compat layer
Initialize some inventory plugin test data files Implement openstack inventory plugin This may be removed later: - port non-JSON line strip method from core Dupliate effort with AWX mainline devel - Produce ansible_version related to venv Refactor some of injector management, moving more of this overhead into tasks.py, when it comes to managing injector kwargs Upgrade and move openstack inventory script sync up parameters Add extremely detailed logic to inventory file creation for ec2, Azure, and gce so that they are closer to a genuine superset of what the contrib script used to give.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import os.path
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -31,3 +32,10 @@ def test_could_be_inventory(filename):
|
||||
def test_is_not_inventory(filename):
|
||||
path = os.path.join(DATA, 'inventories', 'invalid')
|
||||
assert could_be_inventory(DATA, path, filename) is None
|
||||
|
||||
|
||||
def test_filter_non_json_lines():
|
||||
data = {'foo': 'bar', 'bar': 'foo'}
|
||||
dumped_data = json.dumps(data, indent=2)
|
||||
output = 'Openstack does this\nOh why oh why\n{}\ntrailing lines\nneed testing too'.format(dumped_data)
|
||||
assert filter_non_json_lines(output) == dumped_data
|
||||
|
||||
Reference in New Issue
Block a user