summaryrefslogtreecommitdiff
path: root/test/integration/targets/eos_user
diff options
context:
space:
mode:
authorTrishna Guha <trishnaguha17@gmail.com>2017-08-16 12:08:59 +0530
committerGitHub <noreply@github.com>2017-08-16 12:08:59 +0530
commitce3d1c6ba00e1a36c016575ea7d7d04b71923486 (patch)
tree53448664e24635b41cf423a612c36e522039a2eb /test/integration/targets/eos_user
parentd8b1cb9a634d0e828a7be39d4019a6215410e643 (diff)
downloadansible-ce3d1c6ba00e1a36c016575ea7d7d04b71923486.tar.gz
eos_user fix username param (#28114)
* eos_user fix username param Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Add setup eos_user test and rename username for consistency Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * update unit test and pep8 fix Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * pep8 fix
Diffstat (limited to 'test/integration/targets/eos_user')
-rw-r--r--test/integration/targets/eos_user/tests/cli/basic.yaml24
1 files changed, 16 insertions, 8 deletions
diff --git a/test/integration/targets/eos_user/tests/cli/basic.yaml b/test/integration/targets/eos_user/tests/cli/basic.yaml
index 2de8fa369c..1e646e6fd5 100644
--- a/test/integration/targets/eos_user/tests/cli/basic.yaml
+++ b/test/integration/targets/eos_user/tests/cli/basic.yaml
@@ -1,7 +1,15 @@
---
+- name: Set Up
+ eos_config:
+ lines:
+ - no username ansibletest1
+ - no username ansibletest2
+ - no username ansibletest3
+ provider: "{{ cli }}"
+
- name: Create user
eos_user:
- name: netend
+ name: ansibletest1
privilege: 15
role: network-operator
state: present
@@ -12,13 +20,13 @@
- assert:
that:
- 'result.changed == true'
- - 'result.commands == ["username netend role network-operator", "username netend privilege 15"]'
+ - 'result.commands == ["username ansibletest1 role network-operator", "username ansibletest1 privilege 15"]'
- name: Collection of users
eos_user:
aggregate:
- - name: test1
- - name: test2
+ - name: ansibletest2
+ - name: ansibletest3
authorize: yes
state: present
role: network-operator
@@ -28,12 +36,12 @@
- assert:
that:
- 'result.changed == true'
- - 'result.commands == ["username test1 role network-operator", "username test2 role network-operator"]'
+ - 'result.commands == ["username ansibletest2 role network-operator", "username ansibletest3 role network-operator"]'
- name: tearDown
eos_config:
lines:
- - no username netend
- - no username test1
- - no username test2
+ - no username ansibletest1
+ - no username ansibletest2
+ - no username ansibletest3
provider: "{{ cli }}"