Add CRI-O CI (#5460)

This commit is contained in:
Maxime Guyot
2020-04-22 15:09:52 +02:00
committed by GitHub
parent 1c187e9729
commit 09bccc97ba
13 changed files with 109 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
---
driver:
name: vagrant
provider:
name: libvirt
lint:
name: yamllint
options:
config-file: ../../../.yamllint
platforms:
- name: kubespray-crio
box: generic/ubuntu1804
cpus: 2
memory: 1024
groups:
- kube-master
provisioner:
name: ansible
env:
ANSIBLE_ROLES_PATH: ../../../../
config_options:
defaults:
callback_whitelist: profile_tasks
lint:
name: ansible-lint
options:
c: ../../../.ansible-lint
verifier:
name: testinfra
lint:
name: flake8

View File

@@ -0,0 +1,7 @@
---
- name: Converge
hosts: all
become: true
roles:
- role: kubespray-defaults
- role: cri-o

View File

@@ -0,0 +1,6 @@
---
- name: Prepare
hosts: all
gather_facts: False
roles:
- role: bootstrap-os

View File

@@ -0,0 +1,20 @@
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_service(host):
svc = host.service("crio")
assert svc.is_running
assert svc.is_enabled
def test_run(host):
path = "unix:///var/run/crio/crio.sock"
with host.sudo():
cmd = host.command("crictl --runtime-endpoint " + path + " version")
assert cmd.rc == 0
assert "RuntimeName: cri-o" in cmd.stdout