Debian Codegraph @

ansible_collections/community/general/tests/utils/ALIASES.md

raw
1 <!--
2 Copyright (c) Ansible Project
3 GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 SPDX-License-Identifier: GPL-3.0-or-later
5 -->
6
7 # Cleaning up `aliases` skips
8
9 The skip statements in `tests/integration/targets/*/aliases` files may contain specific OSes and their versions.
10
11 For example:
12
13 skip/rhel8.8
14 skip/centos6
15 skip/macos
16
17 Those items being skipped are called `remotes` and they come from the file `test/lib/ansible_test/_data/completion/remote.txt`
18 in the `ansible-core` repository. Eventually, these remotes are removed from that `ansible_test` config,
19 but they keep silently cluttering the aliases files here.
20
21 The scripts `list-remotes` and `clean-aliases-skips` can help you remove those entries from the `aliases` files.
22 For that, you will need to have a clone of the `ansible-core` repository in your machine.
23
24 In the example below, the path to that repo is `../ansible`:
25
26 ```shell
27 ./tests/utils/list-remotes ../ansible
28 ```
29
30 **Note:** The supported versions of `ansible-core` are hardcoded in `list-remotes`. Those should be updated or automated in the future.
31
32 To remove all the skips that are **not** in that list, you should run:
33
34 ```shell
35 ./tests/utils/list-remotes ../ansible | ./tests/utils/clean-aliases-skips
36 ```
37
38 Make sure to thoroughly review the changes before committing!