File tree 3 files changed +10
-15
lines changed
client/molecule/default/tests
server/molecule/default/tests
storage/molecule/default/tests
3 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 7
7
import testinfra .utils .ansible_runner
8
8
9
9
TESTINFRA_HOSTS = testinfra .utils .ansible_runner .AnsibleRunner (
10
- os .environ [' MOLECULE_INVENTORY_FILE' ]
11
- ).get_hosts (' all' )
10
+ os .environ [" MOLECULE_INVENTORY_FILE" ]
11
+ ).get_hosts (" all" )
12
12
13
13
14
14
def test_packages (host ):
@@ -35,6 +35,6 @@ def test_initialization(host):
35
35
with host .sudo ():
36
36
_config = host .file ("/etc/landscape/client.conf" )
37
37
assert _config .exists
38
- assert _config .contains (' https://landscape.canonical.com' ) is False
39
- for _key in [' url' , ' ping_url' , ' data_path' ]:
38
+ assert _config .contains (" https://landscape.canonical.com" ) is False
39
+ for _key in [" url" , " ping_url" , " data_path" ]:
40
40
assert _config .contains (f"{ _key } =" )
Original file line number Diff line number Diff line change 7
7
import testinfra .utils .ansible_runner
8
8
9
9
TESTINFRA_HOSTS = testinfra .utils .ansible_runner .AnsibleRunner (
10
- os .environ [' MOLECULE_INVENTORY_FILE' ]
11
- ).get_hosts (' all' )
10
+ os .environ [" MOLECULE_INVENTORY_FILE" ]
11
+ ).get_hosts (" all" )
12
12
13
13
14
14
def test_packages (host ):
Original file line number Diff line number Diff line change 7
7
import testinfra .utils .ansible_runner
8
8
9
9
TESTINFRA_HOSTS = testinfra .utils .ansible_runner .AnsibleRunner (
10
- os .environ [' MOLECULE_INVENTORY_FILE' ]
11
- ).get_hosts (' all' )
10
+ os .environ [" MOLECULE_INVENTORY_FILE" ]
11
+ ).get_hosts (" all" )
12
12
13
13
14
14
def test_lvm (host ):
15
15
"""
16
16
test if storage was set-up correctly
17
17
"""
18
18
# get variables from file
19
- ansible_vars = host .ansible (
20
- "include_vars" ,
21
- "file=vars/main.yml"
22
- )
19
+ ansible_vars = host .ansible ("include_vars" , "file=vars/main.yml" )
23
20
# check file systems
24
21
for filesys in ansible_vars ["ansible_facts" ]["storage_filesystems" ]:
25
22
assert host .mount_point (filesys ["mountpoint" ]).exists
26
- assert host .mount_point (
27
- filesys ["mountpoint" ]
28
- ).filesystem == filesys ["type" ]
23
+ assert host .mount_point (filesys ["mountpoint" ]).filesystem == filesys ["type" ]
You can’t perform that action at this time.
0 commit comments