mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
Intentional tests
ci_complete ci_coverage
This commit is contained in:
@@ -274,9 +274,6 @@
|
||||
diff: yes
|
||||
register: apt_result
|
||||
|
||||
- debug:
|
||||
var: apt_result
|
||||
|
||||
- name: Check the content of diff.prepared
|
||||
assert:
|
||||
that:
|
||||
@@ -288,3 +285,27 @@
|
||||
name: foo
|
||||
state: absent
|
||||
allow_unauthenticated: yes
|
||||
|
||||
- block:
|
||||
- name: Install foo package version 1.0.0 with force=yes, implies allow_unauthenticated=yes
|
||||
apt:
|
||||
name: foo=1.0.0
|
||||
force: yes
|
||||
register: apt_result
|
||||
|
||||
- name: Check install with dpkg
|
||||
shell: dpkg-query -l foo
|
||||
register: dpkg_result
|
||||
|
||||
- name: Check if install was successful
|
||||
assert:
|
||||
that:
|
||||
- "apt_result is success"
|
||||
- "dpkg_result is success"
|
||||
- "'1.0.0' in dpkg_result.stdout"
|
||||
always:
|
||||
- name: Clean up
|
||||
apt:
|
||||
name: foo
|
||||
state: absent
|
||||
allow_unauthenticated: yes
|
||||
|
||||
@@ -175,3 +175,15 @@
|
||||
- waitfor is successful
|
||||
- waitfor is not changed
|
||||
- "waitfor.port == {{ http_port }}"
|
||||
|
||||
- name: test wait_for with delay
|
||||
wait_for:
|
||||
timeout: 2
|
||||
delay: 2
|
||||
register: waitfor
|
||||
|
||||
- name: verify test wait_for with delay
|
||||
assert:
|
||||
that:
|
||||
- waitfor is successful
|
||||
- waitfor.elapsed >= 4
|
||||
|
||||
Reference in New Issue
Block a user