mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
gem_module: Integration tests for bindir option
This commit is contained in:
parent
ae96c530bd
commit
253c1ed98b
1 changed files with 37 additions and 0 deletions
|
@ -178,3 +178,40 @@
|
|||
that:
|
||||
- install_gem_result is changed
|
||||
- gem_search.files | length == 0
|
||||
|
||||
# Custom directory for executables (--bindir)
|
||||
- name: Install gem with custom bindir
|
||||
gem:
|
||||
name: gist
|
||||
state: present
|
||||
bindir: "{{ output_dir }}/custom_bindir"
|
||||
register: install_gem_result
|
||||
|
||||
- name: Get stats of gem executable
|
||||
stat:
|
||||
path: "{{ output_dir }}/custom_bindir/gist"
|
||||
register: gem_bindir_stat
|
||||
|
||||
- name: Ensure gem executable was installed in custom directory
|
||||
assert:
|
||||
that:
|
||||
- install_gem_result is changed
|
||||
- gem_bindir_stat.stat.exists and gem_bindir_stat.stat.isreg
|
||||
|
||||
- name: Remove gem with custom bindir
|
||||
gem:
|
||||
name: gist
|
||||
state: absent
|
||||
bindir: "{{ output_dir }}/custom_bindir"
|
||||
register: install_gem_result
|
||||
|
||||
- name: Get stats of gem executable
|
||||
stat:
|
||||
path: "{{ output_dir }}/custom_bindir/gist"
|
||||
register: gem_bindir_stat
|
||||
|
||||
- name: Ensure gem executable was removed from custom directory
|
||||
assert:
|
||||
that:
|
||||
- install_gem_result is changed
|
||||
- not gem_bindir_stat.stat.exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue