Skip to content
This repository was archived by the owner on Mar 9, 2024. It is now read-only.

Commit 73599a8

Browse files
committed
molecule: add some tests to make CI work
1 parent b775a9b commit 73599a8

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import os
2+
import pytest
23
import testinfra.utils.ansible_runner
34

45
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
56
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
7+
8+
9+
@pytest.mark.parametrize("files", [
10+
"/etc/systemd/system/ipmi_exporter.service"
11+
])
12+
def test_files(host, files):
13+
f = host.file(files)
14+
assert f.exists
15+
assert f.is_file
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import os
2+
import pytest
23
import testinfra.utils.ansible_runner
34

45
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
56
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
7+
8+
9+
@pytest.mark.parametrize("files", [
10+
"/etc/systemd/system/ipmi_exporter.service"
11+
])
12+
def test_files(host, files):
13+
f = host.file(files)
14+
assert f.exists
15+
assert f.is_file

0 commit comments

Comments
 (0)