Skip to content

Commit

Permalink
fix: Ansible sanity test fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Feb 24, 2024
1 parent 0471da0 commit 4c0f33c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion roles/ceems_api_server/molecule/alternative/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tasks:
- name: Create sacct executable file
ansible.builtin.copy:
src: "../sacct"
src: "../default/files/sacct"
dest: /usr/bin/sacct
owner: root
group: root
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion roles/ceems_api_server/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
tasks:
- name: Create sacct executable file
ansible.builtin.copy:
src: "../sacct"
src: "files/sacct"
dest: /usr/bin/sacct
owner: root
group: root
Expand Down
2 changes: 1 addition & 1 deletion roles/ceems_api_server/molecule/latest/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
tasks:
- name: Create sacct executable file
ansible.builtin.copy:
src: "../sacct"
src: "../default/files/sacct"
dest: /usr/bin/sacct
owner: root
group: root
Expand Down
3 changes: 2 additions & 1 deletion roles/ceems_exporter/molecule/latest/tests/test_latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def test_directories(host):
assert d.is_directory
assert d.exists


def test_capabilities_property(host):
s = host.service("ceems_exporter")
p = s.systemd_properties
Expand Down Expand Up @@ -54,4 +55,4 @@ def test_collectors(host):
exporter_out = host.check_output('curl http://localhost:9010/metrics').strip()
assert "ceems_scrape_collector_success{collector=\"ipmi_dcmi\"}" not in exporter_out
assert "ceems_scrape_collector_success{collector=\"rapl\"}" not in exporter_out
assert "ceems_scrape_collector_success{collector=\"emissions\"}" in exporter_out
assert "ceems_scrape_collector_success{collector=\"emissions\"}" in exporter_out
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import os
import testinfra.utils.ansible_runner
import pytest

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
Expand Down

0 comments on commit 4c0f33c

Please sign in to comment.