mg
ec33333916
rolle einzeln submodule entfernt Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#139 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
23 lines
555 B
Python
23 lines
555 B
Python
import re
|
|
|
|
|
|
def test_dir(host):
|
|
dir = host.file('/usr/local/bin')
|
|
assert dir.exists
|
|
assert dir.is_directory
|
|
assert dir.user == 'root'
|
|
assert dir.group == 'root'
|
|
|
|
|
|
def test_file(host):
|
|
installed_file = host.file('/usr/local/bin/ctop')
|
|
assert installed_file.exists
|
|
assert installed_file.is_file
|
|
assert installed_file.user == 'root'
|
|
assert installed_file.group == 'root'
|
|
|
|
|
|
def test_version(host):
|
|
version = host.check_output('ctop -v')
|
|
pattern = 'ctop version [0-9\\.]+'
|
|
assert re.search(pattern, version)
|