Skip to content

Commit

Permalink
fix: make sure old versions of pytest find helper
Browse files Browse the repository at this point in the history
Signed-off-by: gardar <[email protected]>
  • Loading branch information
gardar committed Sep 27, 2024
1 parent 3b679c9 commit 4e98e1f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .config/molecule/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ verifier:
name: testinfra
additional_files_or_dirs:
- "../../../../../.testinfra/testinfra_helpers.py"
env:
PYTHONPATH: "${MOLECULE_PROJECT_DIRECTORY}/../../.testinfra:${PYTHONPATH}"
provisioner:
playbooks:
converge: "${MOLECULE_PROJECT_DIRECTORY}/../../.config/molecule/converge.yml"
Expand Down
3 changes: 3 additions & 0 deletions .testinfra/testinfra_helpers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import os
import testinfra

Expand Down
1 change: 1 addition & 0 deletions roles/prometheus/molecule/default/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import yaml
from testinfra_helpers import get_target_hosts
import os
import pytest

testinfra_hosts = get_target_hosts()
Expand Down
1 change: 0 additions & 1 deletion roles/snmp_exporter/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
ansible.builtin.get_url:
url: "https://raw.githubusercontent.com/prometheus/snmp_exporter/v{{ snmp_exporter_version }}/snmp.yml"
dest: /etc/snmp_exporter/snmp.yml
validate_certs: false
owner: root
group: root
mode: 0644
Expand Down

0 comments on commit 4e98e1f

Please sign in to comment.