tests: split etc_environment test in two
Turns out nobody supports ~/.pam_environment any more. Keep the behaviour around for the time being.issue510
parent
59eb6d13c5
commit
a717c5406c
@ -0,0 +1,35 @@
|
|||||||
|
# /etc/environment
|
||||||
|
|
||||||
|
- file:
|
||||||
|
path: /etc/environment
|
||||||
|
state: absent
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- shell: echo $MAGIC_ETC_ENV
|
||||||
|
register: echo
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that: echo.stdout == ""
|
||||||
|
|
||||||
|
- copy:
|
||||||
|
dest: /etc/environment
|
||||||
|
content: |
|
||||||
|
MAGIC_ETC_ENV=555
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- shell: echo $MAGIC_ETC_ENV
|
||||||
|
register: echo
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that: echo.stdout == "555"
|
||||||
|
|
||||||
|
- file:
|
||||||
|
path: /etc/environment
|
||||||
|
state: absent
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- shell: echo $MAGIC_ETC_ENV
|
||||||
|
register: echo
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that: echo.stdout == ""
|
@ -0,0 +1,32 @@
|
|||||||
|
# ~/.pam_environment
|
||||||
|
|
||||||
|
- file:
|
||||||
|
path: ~/.pam_environment
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- shell: echo $MAGIC_PAM_ENV
|
||||||
|
register: echo
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that: echo.stdout == ""
|
||||||
|
|
||||||
|
- copy:
|
||||||
|
dest: ~/.pam_environment
|
||||||
|
content: |
|
||||||
|
MAGIC_PAM_ENV=321
|
||||||
|
|
||||||
|
- shell: echo $MAGIC_PAM_ENV
|
||||||
|
register: echo
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that: echo.stdout == "321"
|
||||||
|
|
||||||
|
- file:
|
||||||
|
path: ~/.pam_environment
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- shell: echo $MAGIC_PAM_ENV
|
||||||
|
register: echo
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that: echo.stdout == ""
|
Loading…
Reference in New Issue