From 4ad022b6220ccee8e67377f47f73ac78edb1be9d Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Mon, 24 Jul 2017 13:50:34 +0200 Subject: [PATCH] Add idempotency test to delete aggregate of iosxr users (#27228) --- .../targets/iosxr_user/tests/cli/basic.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/integration/targets/iosxr_user/tests/cli/basic.yaml b/test/integration/targets/iosxr_user/tests/cli/basic.yaml index e2c614a5366..964518b9539 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'