From c377efbd0d6d7b0b651c33181bc703d81c298a6d Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Wed, 24 Jun 2026 06:45:23 -0600 Subject: [PATCH] test: remove unused files We do not use molecule. The custom requirements are no longer needed. Remove py26 requirements Use ansible-core - much smaller than ansible Signed-off-by: Rich Megginson --- .github/workflows/python-unit-test.yml | 11 -------- ansible_pytest_extra_requirements.txt | 4 +-- custom_requirements.txt | 4 --- molecule/default/Dockerfile.j2 | 28 ------------------ molecule/default/molecule.yml | 39 -------------------------- molecule_extra_requirements.txt | 3 -- pytest_extra_requirements.txt | 3 +- tests/get_total_coverage.sh | 2 +- 8 files changed, 3 insertions(+), 91 deletions(-) delete mode 100644 custom_requirements.txt delete mode 100644 molecule/default/Dockerfile.j2 delete mode 100644 molecule/default/molecule.yml delete mode 100644 molecule_extra_requirements.txt diff --git a/.github/workflows/python-unit-test.yml b/.github/workflows/python-unit-test.yml index 2b84fae3b..798066c3a 100644 --- a/.github/workflows/python-unit-test.yml +++ b/.github/workflows/python-unit-test.yml @@ -93,14 +93,3 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v6 - - python-26: - runs-on: ubuntu-latest - steps: - - name: checkout PR - uses: actions/checkout@v6 - - - name: Run py26 tests - uses: linux-system-roles/lsr-gh-action-py26@1.0.2 - env: - TOX_LSR: "git+https://github.com/linux-system-roles/tox-lsr@2.13.2" diff --git a/ansible_pytest_extra_requirements.txt b/ansible_pytest_extra_requirements.txt index 6bafb6f15..a0fb201b1 100644 --- a/ansible_pytest_extra_requirements.txt +++ b/ansible_pytest_extra_requirements.txt @@ -1,6 +1,4 @@ # SPDX-License-Identifier: MIT # ansible and dependencies for all supported platforms -ansible ; python_version > "2.6" -idna<2.8 ; python_version < "2.7" -PyYAML<5.1 ; python_version < "2.7" +ansible-core ; python_version > "2.6" diff --git a/custom_requirements.txt b/custom_requirements.txt deleted file mode 100644 index e52eadf54..000000000 --- a/custom_requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-License-Identifier: MIT - -# Write requirements for running your custom commands in tox here: -PyYAML; python_version == '2.7' or python_version >= '3.5' diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 deleted file mode 100644 index 7d2fbe89f..000000000 --- a/molecule/default/Dockerfile.j2 +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-License-Identifier: MIT -# Molecule managed - -{% if item.registry is defined %} -FROM {{ item.registry.url }}/{{ item.image }} -{% else %} -FROM {{ item.image }} -{% endif %} - -RUN set -euo pipefail; \ - pkgs="python sudo yum-plugin-ovl bash"; \ - if grep 'CentOS release 6' /etc/centos-release > /dev/null 2>&1; then \ - for file in /etc/yum.repos.d/CentOS-*.repo; do \ - if ! grep '^baseurl=.*vault[.]centos[.]org' "$file"; then \ - sed -i -e 's,^mirrorlist,#mirrorlist,' \ - -e 's,^#baseurl=,baseurl=,' \ - -e 's,mirror.centos.org/centos/$releasever,vault.centos.org/6.10,' \ - "$file"; \ - fi; \ - done; \ - pkgs="$pkgs upstart chkconfig initscripts"; \ - fi; \ - if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ - elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3 sudo python3-devel python3-dnf bash && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y $pkgs && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ - elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml deleted file mode 100644 index 91fc962d0..000000000 --- a/molecule/default/molecule.yml +++ /dev/null @@ -1,39 +0,0 @@ -# SPDX-License-Identifier: MIT ---- -dependency: - name: galaxy -driver: - name: ${LSR_MOLECULE_DRIVER:-docker} -platforms: - - name: centos-6 - image: registry.centos.org/centos:6 - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: true - command: /sbin/init - - name: centos-7 - image: registry.centos.org/centos/systemd:latest - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: true - command: /usr/lib/systemd/systemd --system - - name: centos-8 - image: registry.centos.org/centos:8 - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: true - command: /usr/lib/systemd/systemd --system -provisioner: - name: ansible - log: true - playbooks: - converge: ../../tests/tests_default.yml -scenario: - name: default - test_sequence: - - destroy - - create - - converge - - idempotence - - check - - destroy diff --git a/molecule_extra_requirements.txt b/molecule_extra_requirements.txt deleted file mode 100644 index 5ff4857e5..000000000 --- a/molecule_extra_requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-License-Identifier: MIT - -# Write extra requirements for running molecule here: diff --git a/pytest_extra_requirements.txt b/pytest_extra_requirements.txt index 26dc32d36..80479ff01 100644 --- a/pytest_extra_requirements.txt +++ b/pytest_extra_requirements.txt @@ -6,5 +6,4 @@ # If you need mock then uncomment the following line: mock ; python_version < "3.0" # ansible and dependencies for all supported platforms -ansible ; python_version > "2.6" -idna<2.8 ; python_version < "2.7" +ansible-core ; python_version > "2.6" diff --git a/tests/get_total_coverage.sh b/tests/get_total_coverage.sh index 42c60da28..f15ae417b 100755 --- a/tests/get_total_coverage.sh +++ b/tests/get_total_coverage.sh @@ -16,7 +16,7 @@ rm -f remote-coveragedata* "${coverage_data}" # collect pytest coverage -tox -e py26,py27,py36,py37 -- --cov-append +tox -e py27,py36,py37 -- --cov-append for test_playbook in tests_*.yml do