Port inventory source injector tests to functional tests

This new batch of tests assures that the injector logic
for inventory source in their old script version remains
untouched with the refactoring underway.

Plugins are also tested by the same means of comparing
to reference files, these will be used to assure that
all parameters that used to be respected are still
respected in the plugin system.
This commit is contained in:
AlanCoding
2019-01-15 07:28:55 -05:00
parent d46a403a49
commit 5cbcfbe0c6
17 changed files with 407 additions and 12 deletions

View File

@@ -2035,11 +2035,12 @@ class TestInventoryUpdateCredentials(TestJobExecution):
assert 'cache' in config.sections()
assert config.getint('cache', 'cache_max_age') == 0
# Change the initial version of the inventory plugin to force use of script
with mock.patch('awx.main.models.inventory.gce.initial_version', None):
run('')
run('')
inventory_update.source_regions = 'us-east-4'
run('us-east-4')
self.instance.source_regions = 'us-east-4'
run('us-east-4')
def test_openstack_source(self, inventory_update, private_data_dir):
task = tasks.RunInventoryUpdate()