Browse Source

Add Kubernetes conformance tests (#4614)

pull/4601/head
Maxime Guyot 5 years ago
committed by Kubernetes Prow Robot
parent
commit
e30a703c8e
3 changed files with 41 additions and 0 deletions
  1. 1
      tests/files/tf-ovh_ubuntu18-calico.yml
  2. 3
      tests/scripts/testcases_run.sh
  3. 37
      tests/testcases/100_check-k8s-conformance.yml

1
tests/files/tf-ovh_ubuntu18-calico.yml

@ -1,3 +1,4 @@
---
dns_min_replicas: 1
deploy_netchecker: true
sonobuoy_enabled: true

3
tests/scripts/testcases_run.sh

@ -45,6 +45,9 @@ ansible-playbook -e ansible_python_interpreter=${PYPATH} --limit "all:!fake_host
## Advanced DNS checks
ansible-playbook -e ansible_python_interpreter=${PYPATH} --limit "all:!fake_hosts" tests/testcases/040_check-network-adv.yml $LOG_LEVEL
## Kubernetes conformance tests
ansible-playbook -i ${ANSIBLE_INVENTORY} -e ansible_python_interpreter=${PYPATH} -e @${CI_TEST_VARS} --limit "all:!fake_hosts" tests/testcases/100_check-k8s-conformance.yml $LOG_LEVEL
## Idempotency checks 1/5 (repeat deployment)
if [ "${IDEMPOT_CHECK}" = "true" ]; then
ansible-playbook ${LOG_LEVEL} -e @${CI_TEST_VARS} -e ansible_python_interpreter=${PYPATH} -e local_release_dir=${PWD}/downloads --limit "all:!fake_hosts" cluster.yml

37
tests/testcases/100_check-k8s-conformance.yml

@ -0,0 +1,37 @@
---
- hosts: kube-master[0]
vars:
sonobuoy_version: 0.14.1
sonobuoy_arch: amd64
sonobuoy_parallel: 30
sonobuoy_path: /usr/local/bin/sonobuoy
sonobuoy_skip: 'Alpha|Disruptive|Feature|Flaky|Slow|Serial'
sonobuoy_mode: Quick
tasks:
- name: Run sonobuoy
when:
- sonobuoy_enabled is defined
- sonobuoy_enabled
block:
- name: Download sonobuoy
get_url:
url: "https://github.com/heptio/sonobuoy/releases/download/v{{ sonobuoy_version }}/sonobuoy_{{ sonobuoy_version }}_linux_{{ sonobuoy_arch }}.tar.gz"
dest: /tmp/sonobuoy.tar.gz
- name: Extract sonobuoy
unarchive:
src: /tmp/sonobuoy.tar.gz
dest: /usr/local/bin/
copy: no
- name: Run sonobuoy
command: "{{ sonobuoy_path }} run --mode {{ sonobuoy_mode }} --e2e-parallel {{ sonobuoy_parallel }} --e2e-skip {{ sonobuoy_skip }} --wait"
when: sonobuoy_enabled | default(false)
- name: Run sonobuoy retrieve
command: "{{ sonobuoy_path }} retrieve"
register: sonobuoy_retrieve
- name: Run inspect results
command: "{{ sonobuoy_path }} e2e {{ sonobuoy_retrieve.stdout }}"
Loading…
Cancel
Save