File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -42,5 +42,7 @@ scenario:
4242 name : default
4343verifier :
4444 name : testinfra
45+ options :
46+ v : true
4547 lint :
4648 name : flake8
Original file line number Diff line number Diff line change @@ -12,3 +12,36 @@ def test_hosts_file(host):
1212 assert f .exists
1313 assert f .user == 'root'
1414 assert f .group == 'root'
15+
16+
17+ def test_sssd_ldap_user (host ):
18+ user = host .user ('test' )
19+ assert user .uid == 5000
20+ assert user .gid == 1
21+
22+
23+ def test_sssd_service_state (host ):
24+ assert host .service ('sssd' ).is_enabled
25+ assert host .service ('sssd' ).is_running
26+
27+
28+ def test_sshd_service_state (host ):
29+ assert host .service ('sshd' ).is_enabled
30+ assert host .service ('sshd' ).is_running
31+
32+
33+ def test_ssh_access (host ):
34+ host .run_test (
35+ '/usr/bin/ssh '
36+ '-o StrictHostKeyChecking=no '
37+ '-o BatchMode=yes '
38+ '-T '
39+ '-i /root/.ssh/id_rsa '
40+ '-l test '
41+ 'localhost '
42+ 'exit'
43+ )
44+
45+
46+ def test_homedir_created (host ):
47+ assert host .file ('/home/test' ).is_directory
You can’t perform that action at this time.
0 commit comments