Skip to content

Commit

Permalink
Merge pull request #2959 from haircommander/check_swap
Browse files Browse the repository at this point in the history
test: properly check return code of results
  • Loading branch information
openshift-merge-robot committed Nov 8, 2019
2 parents b711867 + e74a87e commit 9a32265
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 9a32265

Please sign in to comment.