Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix molecule tests so that PR's can properly validated #180

Merged
merged 10 commits into from
Oct 20, 2023
13 changes: 5 additions & 8 deletions .github/workflows/telegraf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,21 @@ on:
- '.github/workflows/telegraf.yml'
jobs:
molecule:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
molecule_distro:
- container: centos7
image: geerlingguy/docker-centos7-ansible:latest
- container: rocky8
image: geerlingguy/docker-rockylinux8-ansible
# - container: rocky9
# image: geerlingguy/docker-rockylinux9-ansible
- container: rocky9
image: geerlingguy/docker-rockylinux9-ansible
- container: ubuntu2204
image: geerlingguy/docker-ubuntu2204-ansible:latest
- container: ubuntu2004
image: geerlingguy/docker-ubuntu2004-ansible:latest
- container: ubuntu1804
image: geerlingguy/docker-ubuntu1804-ansible:latest
- container: ubuntu1604
image: geerlingguy/docker-ubuntu1604-ansible:latest
- container: debian9
image: geerlingguy/docker-debian9-ansible:latest
- container: debian10
Expand All @@ -57,7 +55,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
curl -so requirements.txt 'https://raw.githubusercontent.com/dj-wasabi/dj-wasabi-release/main/requirements.txt'
pip install -r requirements.txt

- name: Run role tests on empty systems in check-mode
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,28 @@
Emerson Knapp
Farshad Nematdoust
Greg
Harald Kraemer
Heckel, Robert J
Ilkka Tengvall
Ismael
Jack Ivy
Jeff Mahoney
Jeroen Geusebroek
Klett IT
Kyle
Laurent Hoss
Lex Rivera
Marcin Wito
Markus Langer
Matt
Max Nasonov
Miroslav Prasil
NotDead
Olivier Boukili
Pascal
Pavel Savchenko
PeterSzegedi
Pieter Lexis (TomTom)
Puneeth Nanjundaswamy
Rick Box
Rohit Gohri
Expand Down
6 changes: 3 additions & 3 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependency:
driver:
name: docker

role_name_check: 1
platforms:
- name: influxdb
image: influxdb:1.7-alpine
Expand All @@ -19,10 +20,11 @@ platforms:
command: ${MY_MOLECULE_DOCKER_COMMAND:-""}
privileged: True
pre_build_image: True
cgroupns_mode: host
networks:
- name: telegraf
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- telegraf

Expand Down Expand Up @@ -64,5 +66,3 @@ scenario:
name: default
verifier:
name: testinfra
lint:
name: flake8
6 changes: 3 additions & 3 deletions molecule/empty-checkmode/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ dependency:
driver:
name: docker

role_name_check: 1
platforms:
- name: telegraf-${MY_MOLECULE_CONTAINER:-centos8}
image: ${MY_MOLECULE_IMAGE:-"geerlingguy/docker-centos8-ansible"}
command: ${MY_MOLECULE_DOCKER_COMMAND:-""}
privileged: True
pre_build_image: True
cgroupns_mode: host
networks:
- name: telegraf
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
groups:
- telegraf

Expand Down Expand Up @@ -66,5 +68,3 @@ scenario:
- destroy
verifier:
name: testinfra
lint:
name: flake8
10 changes: 10 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ansible==8.2.0
ansible-compat==4.1.7
ansible-core==2.15.2
docker==6.1.3
molecule==6.0.1
molecule-docker==2.1.0
netaddr==0.8.0
pytest==7.4.2
pytest-testinfra==9.0.0
testinfra==6.0.0
Loading