mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-11 01:57:37 -03:30
Convert cri-dockerd molecule to ansible verifier
This commit is contained in:
parent
68c4ee23cb
commit
1ccb3a38a2
@ -29,4 +29,4 @@ provisioner:
|
||||
create: ../../../../../tests/cloud_playbooks/create-kubevirt.yml
|
||||
prepare: ../../../molecule/prepare.yml
|
||||
verifier:
|
||||
name: testinfra
|
||||
name: ansible
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
import os
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_run_pod(host):
|
||||
run_command = "/usr/local/bin/crictl run --with-pull /tmp/container.json /tmp/sandbox.json"
|
||||
with host.sudo():
|
||||
cmd = host.command(run_command)
|
||||
assert cmd.rc == 0
|
||||
|
||||
with host.sudo():
|
||||
log_f = host.file("/tmp/cri-dockerd1.0.log")
|
||||
|
||||
assert log_f.exists
|
||||
assert b"Hello from Docker" in log_f.content
|
||||
@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Test cri-dockerd
|
||||
import_playbook: ../../../molecule/test_cri.yml
|
||||
vars:
|
||||
container_manager: cri-dockerd
|
||||
cri_socket: unix:///var/run/cri-dockerd.sock
|
||||
cri_name: docker
|
||||
|
||||
- name: Test running a container with docker
|
||||
import_playbook: ../../../molecule/test_runtime.yml
|
||||
vars:
|
||||
container_runtime: docker
|
||||
# cri-dockerd does not support multiple runtime handler before 0.4.0
|
||||
# https://github.com/Mirantis/cri-dockerd/pull/350
|
||||
# TODO: check this when we upgrade cri-dockerd
|
||||
Loading…
x
Reference in New Issue
Block a user