Skip to content

Commit

Permalink
test: test failures and successes correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hunt <pehunt@redhat.com>
  • Loading branch information
haircommander committed Nov 8, 2019
1 parent b711867 commit e74a87e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions contrib/test/integration/disable_swap.yml
@@ -1,5 +1,4 @@
---

- name: All active swap devices are known
command: 'swapon --show --ifexists --noheadings'
changed_when: False # only looking
Expand All @@ -12,8 +11,7 @@
- name: All persistent swap devices from fstab are known
command: findmnt --fstab --type swap --output SOURCE --noheadings
# findmnt exit(1) if no swap devices found, expect real errors to appear on stderr
failed_when: result | failed and
result.stderr | trim | length
failed_when: result.rc != 0 and result.stderr | trim | length
changed_when: False # only looking
register: result

Expand Down
2 changes: 1 addition & 1 deletion contrib/test/integration/e2e-base.yml
Expand Up @@ -52,7 +52,7 @@
- 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
until: kube_poll.rc == 0
retries: 100
delay: 30

Expand Down

0 comments on commit e74a87e

Please sign in to comment.