mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 11:53:12 +00:00
fix: future-import-boilerplate and metaclass-boilerplate
Signed-off-by: gardar <gardar@users.noreply.github.com>
This commit is contained in:
parent
cac0f68ca2
commit
3227cf01ec
13 changed files with 52 additions and 13 deletions
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import yaml
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
@ -10,7 +13,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||
@pytest.fixture()
|
||||
def AnsibleDefaults():
|
||||
with open("defaults/main.yml", 'r') as stream:
|
||||
return yaml.load(stream)
|
||||
return yaml.full_load(stream)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("dirs", [
|
||||
|
@ -69,5 +72,5 @@ def test_socket(host):
|
|||
def test_version(host, AnsibleDefaults):
|
||||
version = os.getenv('PROMETHEUS', AnsibleDefaults['prometheus_version'])
|
||||
run = host.run("/usr/local/bin/prometheus --version")
|
||||
out = run.stdout+run.stderr
|
||||
out = run.stdout + run.stderr
|
||||
assert "prometheus, version " + version in out
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import pytest
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
import pytest
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
|
Loading…
Reference in a new issue