ansible-role-gitlab_runner/molecule/default/tests/test_default.py

19 lines
483 B
Python
Raw Normal View History

2020-08-09 06:20:33 +00:00
import testinfra.utils.ansible_runner
def test_packages(host):
package = host.package('gitlab-runner')
assert package.is_installed
def test_config_file(host):
config = host.file('/etc/gitlab-runner/config.toml')
assert config.exists
assert config.is_file
assert config.user == 'root'
assert config.group == 'root'
assert config.mode == 0o600
def test_service(host):
service = host.service('gitlab-runner')
assert service.is_running
assert service.is_enabled