Refactor the CRI-O test playbook to be more modular
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
This commit is contained in:
parent
89f18fa7b5
commit
e160796d4e
12 changed files with 550 additions and 618 deletions
44
contrib/test/integration/e2e.yml
Normal file
44
contrib/test/integration/e2e.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
- name: enable and start CRI-O
|
||||
systemd:
|
||||
name: crio
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
|
||||
- name: update the server address for the custom cluster
|
||||
lineinfile:
|
||||
dest: /usr/local/bin/createcluster.sh
|
||||
line: "export {{ item }}={{ ansible_eth0.ipv4.address }}"
|
||||
regexp: "^export {{ item }}="
|
||||
state: present
|
||||
with_items:
|
||||
- DNS_SERVER_IP
|
||||
- API_HOST
|
||||
- API_HOST_IP
|
||||
|
||||
- name: enable and start the custom cluster
|
||||
systemd:
|
||||
name: customcluster.service
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
|
||||
- name: wait for the cluster to be running
|
||||
command: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes/_output/bin/kubectl get service kubernetes --namespace default"
|
||||
register: kube_poll
|
||||
until: kube_poll | succeeded
|
||||
retries: 100
|
||||
delay: 30
|
||||
|
||||
- name: ensure directory exists for e2e reports
|
||||
file:
|
||||
path: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes/artifacts"
|
||||
state: directory
|
||||
|
||||
- name: run e2e tests
|
||||
shell: |
|
||||
go run hack/e2e.go -v --test -test_args="-host=https://{{ ansible_default_ipv4.address }}:6443 --ginkgo.focus=\[Conformance\]" >e2e.log 2>&1
|
||||
args:
|
||||
chdir: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes"
|
||||
ignore_errors: yes
|
Loading…
Add table
Add a link
Reference in a new issue