Commit d46189c 1 parent 74681ef commit d46189c Copy full SHA for d46189c
File tree 3 files changed +30
-0
lines changed
3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ import os
2
+ import testinfra .utils .ansible_runner
3
+
4
+ testinfra_hosts = testinfra .utils .ansible_runner .AnsibleRunner (
5
+ os .environ ['MOLECULE_INVENTORY_FILE' ]).get_hosts ('all' )
6
+
7
+
8
+ def test_containerd_installed (host ):
9
+
10
+ assert host .package ('containerd.io' ).is_installed
11
+
12
+
13
+ def test_containerd_service (host ):
14
+
15
+ s = host .service ('containerd' )
16
+ assert s .is_running
17
+ assert s .is_enabled
Original file line number Diff line number Diff line change
1
+ import os
2
+ import testinfra .utils .ansible_runner
3
+
4
+ testinfra_hosts = testinfra .utils .ansible_runner .AnsibleRunner (
5
+ os .environ ['MOLECULE_INVENTORY_FILE' ]).get_hosts ('all' )
6
+
7
+
8
+ def test_docker_cli_installed (host ):
9
+
10
+ assert host .package ('docker-ce-cli' ).is_installed
Original file line number Diff line number Diff line change 4
4
testinfra_hosts = testinfra .utils .ansible_runner .AnsibleRunner (
5
5
os .environ ['MOLECULE_INVENTORY_FILE' ]).get_hosts ('all' )
6
6
7
+ debian_os = ['debian' , 'ubuntu' ]
8
+ rhel_os = ['redhat' , 'centos' ]
9
+
7
10
8
11
def test_docker_ce_config (host ):
9
12
You can’t perform that action at this time.
0 commit comments