diff options
Diffstat (limited to 'ansible/roles/rke/molecule')
-rw-r--r-- | ansible/roles/rke/molecule/default/molecule.yml | 1 | ||||
-rw-r--r-- | ansible/roles/rke/molecule/default/tests/test_etcd.py | 13 | ||||
-rw-r--r-- | ansible/roles/rke/molecule/default/tests/test_nodes.py | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/ansible/roles/rke/molecule/default/molecule.yml b/ansible/roles/rke/molecule/default/molecule.yml index 444a7519..6ae613a9 100644 --- a/ansible/roles/rke/molecule/default/molecule.yml +++ b/ansible/roles/rke/molecule/default/molecule.yml @@ -19,6 +19,7 @@ platforms: container: docker groups: - infrastructure + - kubernetes-etcd - kubernetes-control-plane - kubernetes networks: diff --git a/ansible/roles/rke/molecule/default/tests/test_etcd.py b/ansible/roles/rke/molecule/default/tests/test_etcd.py new file mode 100644 index 00000000..0f4b6f12 --- /dev/null +++ b/ansible/roles/rke/molecule/default/tests/test_etcd.py @@ -0,0 +1,13 @@ +import os +import pytest + +import testinfra.utils.ansible_runner + +testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('kubernetes-etcd') + + +@pytest.mark.parametrize('container_name', [ + 'etcd']) +def test_container_running(host, container_name): + assert host.docker(container_name).is_running diff --git a/ansible/roles/rke/molecule/default/tests/test_nodes.py b/ansible/roles/rke/molecule/default/tests/test_nodes.py index fcc5e7e6..60413018 100644 --- a/ansible/roles/rke/molecule/default/tests/test_nodes.py +++ b/ansible/roles/rke/molecule/default/tests/test_nodes.py @@ -8,6 +8,6 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( @pytest.mark.parametrize('container_name', [ - 'etcd', 'kubelet', 'kube-proxy']) + 'kubelet', 'kube-proxy']) def test_container_running(host, container_name): assert host.docker(container_name).is_running |