ansible-test - Fix self-test change handling. (#78521)

pull/78528/head
Matt Clay 2 years ago committed by GitHub
parent 86298b7a47
commit 99016653a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix change detection for ansible-test's own integration tests.

@ -746,13 +746,13 @@ class PathMapper:
if path.startswith('test/lib/ansible_test/_internal/commands/sanity/'):
return {
'sanity': 'all', # test infrastructure, run all sanity checks
'integration': 'ansible-test', # run ansible-test self tests
'integration': 'ansible-test/', # run ansible-test self tests
}
if path.startswith('test/lib/ansible_test/_internal/commands/units/'):
return {
'units': 'all', # test infrastructure, run all unit tests
'integration': 'ansible-test', # run ansible-test self tests
'integration': 'ansible-test/', # run ansible-test self tests
}
if path.startswith('test/lib/ansible_test/_data/requirements/'):
@ -776,13 +776,13 @@ class PathMapper:
if path.startswith('test/lib/ansible_test/_util/controller/sanity/') or path.startswith('test/lib/ansible_test/_util/target/sanity/'):
return {
'sanity': 'all', # test infrastructure, run all sanity checks
'integration': 'ansible-test', # run ansible-test self tests
'integration': 'ansible-test/', # run ansible-test self tests
}
if path.startswith('test/lib/ansible_test/_util/target/pytest/'):
return {
'units': 'all', # test infrastructure, run all unit tests
'integration': 'ansible-test', # run ansible-test self tests
'integration': 'ansible-test/', # run ansible-test self tests
}
if path.startswith('test/lib/'):

@ -612,6 +612,9 @@ class IntegrationTarget(CompletionTarget):
groups += [a for a in static_aliases if a not in modules]
groups += ['module/%s' % m for m in self.modules]
if data_context().content.is_ansible and (self.name == 'ansible-test' or self.name.startswith('ansible-test-')):
groups.append('ansible-test')
if not self.modules:
groups.append('non_module')

Loading…
Cancel
Save