Improve test reliability for win_chocolatey. (#30440)

* Rename variables.
* Test install with chocolatey-core.extension.
This commit is contained in:
Matt Clay 2017-09-15 13:35:10 -07:00 committed by GitHub
parent 8799038a89
commit b9d8637e37

View file

@ -16,46 +16,46 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
- name: install sysinternals
- name: install chocolatey-core.extension
win_chocolatey:
name: sysinternals
name: chocolatey-core.extension
state: present
register: install_sysinternals
register: install
- name: verify install sysinternals
- name: verify install chocolatey-core.extension
assert:
that:
- 'install_sysinternals.changed == true'
- 'install.changed == true'
- name: install sysinternals again
- name: install chocolatey-core.extension again
win_chocolatey:
name: sysinternals
name: chocolatey-core.extension
state: present
register: install_sysinternals_again
register: install_again
- name: verify install sysinternals again
- name: verify install chocolatey-core.extension again
assert:
that:
- 'install_sysinternals_again.changed == false'
- 'install_again.changed == false'
- name: remove sysinternals
- name: remove chocolatey-core.extension
win_chocolatey:
name: sysinternals
name: chocolatey-core.extension
state: absent
register: remove_sysinternals
register: remove
- name: verify remove sysinternals
- name: verify remove chocolatey-core.extension
assert:
that:
- 'remove_sysinternals.changed == true'
- 'remove.changed == true'
- name: remove sysinternals again
- name: remove chocolatey-core.extension again
win_chocolatey:
name: sysinternals
name: chocolatey-core.extension
state: absent
register: remove_sysinternals_again
register: remove_again
- name: verify remove sysinternals again
- name: verify remove chocolatey-core.extension again
assert:
that:
- 'remove_sysinternals_again.changed == false'
- 'remove_again.changed == false'