mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 05:10:20 +00:00
chore: align molecule tests to use get_target_hosts()
Signed-off-by: dobbi84 <davide.obbi@e4company.com>
This commit is contained in:
parent
10d70f06a4
commit
02aefecad2
4 changed files with 11 additions and 13 deletions
|
@ -9,14 +9,18 @@ galaxy_info:
|
|||
versions:
|
||||
- "focal"
|
||||
- "jammy"
|
||||
- "noble"
|
||||
- name: "Debian"
|
||||
versions:
|
||||
- "bullseye"
|
||||
- "buster"
|
||||
- name: "EL"
|
||||
versions:
|
||||
- "8"
|
||||
- "9"
|
||||
- name: "Fedora"
|
||||
versions:
|
||||
- "39"
|
||||
- "40"
|
||||
galaxy_tags:
|
||||
- "monitoring"
|
||||
- "prometheus"
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_service(host):
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
def test_files(host):
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
from testinfra_helpers import get_target_hosts
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
testinfra_hosts = get_target_hosts()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("files", [
|
||||
|
|
Loading…
Reference in a new issue