Last active
May 14, 2020 16:57
-
-
Save BrianJakovich/61651680799dd487020845e2eb150dba to your computer and use it in GitHub Desktop.
workspaces-image-factory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
View here: https://github.com/VerticalRelevance/workspaces-image-factory/blob/master/tests/test.py