mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-07-28 23:51:32 -07:00
added gcsfuse role tests for GitHub Actions
This commit is contained in:
parent
416bf30c1e
commit
3432cf3878
9 changed files with 283 additions and 0 deletions
20
molecule/gcsfuse/tests/test_default.py
Normal file
20
molecule/gcsfuse/tests/test_default.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import os
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_service(host):
|
||||
service = host.service('docker')
|
||||
|
||||
assert service.is_running
|
||||
assert service.is_enabled
|
||||
|
||||
|
||||
def test_hosts_file(host):
|
||||
f = host.file('/etc/hosts')
|
||||
|
||||
assert f.exists
|
||||
assert f.user == 'root'
|
||||
assert f.group == 'root'
|
Loading…
Add table
Add a link
Reference in a new issue