From 4c97bad28eea2152df7a92c4d8f26146075c4b5f Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 18 Jan 2017 11:52:16 -0800 Subject: [PATCH] Update ansible-test network change classification. --- test/runner/lib/classification.py | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/test/runner/lib/classification.py b/test/runner/lib/classification.py index 4b6153d2e6..1a99af864f 100644 --- a/test/runner/lib/classification.py +++ b/test/runner/lib/classification.py @@ -174,6 +174,19 @@ class PathMapper(object): } if ext == '.py': + network_utils = ( + 'netcfg', + 'netcli', + 'network_common', + 'network', + ) + + if name in network_utils: + return { + 'network-integration': 'network/', # target all network platforms + 'units': 'all', + } + if name in self.prefixes and self.prefixes[name] == 'network': network_target = 'network/%s/' % name @@ -242,6 +255,28 @@ class PathMapper(object): 'units': units_path, } + if path.startswith('lib/ansible/plugins/terminal/'): + if ext == '.py': + if name in self.prefixes and self.prefixes[name] == 'network': + network_target = 'network/%s/' % name + + if network_target in self.integration_targets_by_alias: + return { + 'network-integration': network_target, + 'units': 'all', + } + + display.warning('Integration tests for "%s" not found.' % network_target) + + return { + 'units': 'all', + } + + return { + 'network-integration': 'all', + 'units': 'all', + } + if path.startswith('lib/ansible/utils/module_docs_fragments/'): return { 'sanity': 'all',