cri-o/contrib/test/integration/test.yml
Daniel J Walsh 1a41d6ecd4 Remove references to overlay2 in the code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-29 20:34:29 +00:00

51 lines
1.7 KiB
YAML

---
- name: Change test_runner.sh to use bats xunit output
lineinfile:
dest: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o/test/test_runner.sh"
line: 'execute time bats --tap --junit $TESTS'
regexp: 'execute time bats --tap \$TESTS'
state: present
when: xunit
- name: Make testing output verbose so it can be converted to xunit
lineinfile:
dest: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes/hack/make-rules/test.sh"
line: ' go test -v "${goflags[@]:+${goflags[@]}}" \'
regexp: ' go test \"\$'
state: present
- name: set extra storage options
set_fact:
extra_storage_opts: " --storage-opt overlay.override_kernel_check=1"
when: ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS'
- name: set extra shell for non-xunit tests
set_fact:
extra_shell_suffix: " &> {{ artifacts }}/testout.txt"
when: not xunit
- name: run integration tests
shell: "CGROUP_MANAGER=cgroupfs STORAGE_OPTS='--storage-driver=overlay{{ extra_storage_opts | default('') }}' make localintegration{{ extra_shell_suffix }}"
args:
chdir: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o"
ignore_errors: yes
register: integration_test
async: 5400
poll: 30
- name: Make testing output directory
file:
path: "{{ artifacts }}"
state: directory
ignore_errors: yes
when: xunit
- name: Move all xunit files into one dir to scp
shell: "mv {{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o/test/TestReport-bats*.xml {{ artifacts }}"
when: xunit
- name: ensure we fail on bad tests
fail:
msg: Integration tests failed!
when: "'not ok' in integration_test.stdout"