Skip to content

Instantly share code, notes, and snippets.

@BrianJakovich
Last active May 14, 2020 16:57
Show Gist options
  • Save BrianJakovich/61651680799dd487020845e2eb150dba to your computer and use it in GitHub Desktop.
Save BrianJakovich/61651680799dd487020845e2eb150dba to your computer and use it in GitHub Desktop.
workspaces-image-factory
import pytest
import testinfra
@pytest.mark.parametrize("name,version", [
("7zip", "18.5.0.20180730"),
])
def test_packages(host, name, version):
pkg = host.package(name)
assert pkg.is_installed
assert pkg.version.startswith(version)
# def check_ansible_play(host):
# """
# Verify that a package is installed using Ansible
# package module
# """
# assert not host.ansible("package", "name=7zip state=present")["changed"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment