summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Carrillo Cruz <ricardo.carrillo.cruz@gmail.com>2017-07-24 13:50:34 +0200
committerGitHub <noreply@github.com>2017-07-24 13:50:34 +0200
commit4ad022b6220ccee8e67377f47f73ac78edb1be9d (patch)
tree95a06b8324c4d664dc09a6b6b43891f8c85e7548
parent2dc5066f83e1ddd18661ffa713d0b8a43f7f656a (diff)
downloadansible-4ad022b6220ccee8e67377f47f73ac78edb1be9d.tar.gz
Add idempotency test to delete aggregate of iosxr users (#27228)
-rw-r--r--test/integration/targets/iosxr_user/tests/cli/basic.yaml17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/integration/targets/iosxr_user/tests/cli/basic.yaml b/test/integration/targets/iosxr_user/tests/cli/basic.yaml
index e2c614a536..964518b953 100644
--- a/test/integration/targets/iosxr_user/tests/cli/basic.yaml
+++ b/test/integration/targets/iosxr_user/tests/cli/basic.yaml
@@ -64,7 +64,7 @@
- 'result.changed == false'
- 'result.commands | length == 0'
-- name: tearDown
+- name: Delete collection of users
iosxr_user:
users:
- name: ansibletest1
@@ -78,3 +78,18 @@
that:
- 'result.changed == true'
- 'result.commands == ["no username ansibletest1", "no username ansibletest2", "no username ansibletest3"]'
+
+- name: Delete collection of users again (idempotent)
+ iosxr_user:
+ users:
+ - name: ansibletest1
+ - name: ansibletest2
+ - name: ansibletest3
+ state: absent
+ provider: "{{ cli }}"
+ register: result
+
+- assert:
+ that:
+ - 'result.changed == false'
+ - 'result.commands | length == 0'