win_chocolatey - remove test for allow_multiple (#80951)

pull/81123/head
Jordan Borean 3 years ago committed by GitHub
parent e536c8ded9
commit f72b82ed8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -459,24 +459,25 @@
name: '{{ test_choco_package1 }}' name: '{{ test_choco_package1 }}'
state: present state: present
- name: install older package with allow_multiple # Chocolatey 2.0.0 removed support for allow_multiple so we can no longer test this.
win_chocolatey: # - name: install older package with allow_multiple
name: '{{ test_choco_package1 }}' # win_chocolatey:
state: present # name: '{{ test_choco_package1 }}'
allow_multiple: True # state: present
version: '0.0.1' # allow_multiple: True
register: allow_multiple # version: '0.0.1'
# register: allow_multiple
- name: get result of install older package with allow_multiple
win_command: choco.exe list --local-only --limit-output --all-versions # - name: get result of install older package with allow_multiple
register: allow_multiple_actual # win_command: choco.exe list --local-only --limit-output --all-versions
# register: allow_multiple_actual
- name: assert install older package with allow_multiple
assert: # - name: assert install older package with allow_multiple
that: # assert:
- allow_multiple is changed # that:
- '"ansible|0.1.0" in allow_multiple_actual.stdout_lines' # - allow_multiple is changed
- '"ansible|0.0.1" in allow_multiple_actual.stdout_lines' # - '"ansible|0.1.0" in allow_multiple_actual.stdout_lines'
# - '"ansible|0.0.1" in allow_multiple_actual.stdout_lines'
- name: pin 2 packages (check mode) - name: pin 2 packages (check mode)
win_chocolatey: win_chocolatey:
@ -531,23 +532,24 @@
that: that:
- not pin_multiple_again is changed - not pin_multiple_again is changed
- name: pin specific older version # Chocolatey 2.0.0 removed support for allow_multiple so we can no longer test this.
win_chocolatey: # - name: pin specific older version
name: '{{ test_choco_package1 }}' # win_chocolatey:
state: present # name: '{{ test_choco_package1 }}'
pinned: yes # state: present
version: '0.0.1' # pinned: yes
register: pin_older # version: '0.0.1'
# register: pin_older
- name: get result of pin specific older version
win_command: choco.exe pin list --limit-output # - name: get result of pin specific older version
register: pin_older_actual # win_command: choco.exe pin list --limit-output
# register: pin_older_actual
- name: assert pin specific older version
assert: # - name: assert pin specific older version
that: # assert:
- pin_older is changed # that:
- pin_older_actual.stdout_lines == ["ansible|0.1.0", "ansible|0.0.1", "ansible-test|1.0.1-beta1"] # - pin_older is changed
# - pin_older_actual.stdout_lines == ["ansible|0.1.0", "ansible|0.0.1", "ansible-test|1.0.1-beta1"]
- name: unpin package at version - name: unpin package at version
win_chocolatey: win_chocolatey:
@ -565,7 +567,7 @@
assert: assert:
that: that:
- unpin_version is changed - unpin_version is changed
- unpin_version_actual.stdout_lines == ["ansible|0.0.1", "ansible-test|1.0.1-beta1"] - unpin_version_actual.stdout_lines == ["ansible-test|1.0.1-beta1"]
- name: unpin multiple packages without a version - name: unpin multiple packages without a version
win_chocolatey: win_chocolatey:
@ -586,20 +588,21 @@
- unpin_multiple is changed - unpin_multiple is changed
- unpin_multiple_actual.stdout == "" - unpin_multiple_actual.stdout == ""
- name: uninstall specific version installed with allow_multiple # Chocolatey 2.0.0 removed support for allow_multiple so we can no longer test this.
win_chocolatey: # - name: uninstall specific version installed with allow_multiple
name: '{{ test_choco_package1 }}' # win_chocolatey:
state: absent # name: '{{ test_choco_package1 }}'
version: '0.0.1' # state: absent
register: remove_multiple # version: '0.0.1'
# register: remove_multiple
- name: get result of uninstall specific version installed with allow_multiple
win_command: choco.exe list --local-only --limit-output --all-versions # - name: get result of uninstall specific version installed with allow_multiple
register: remove_multiple_actual # win_command: choco.exe list --local-only --limit-output --all-versions
# register: remove_multiple_actual
- name: assert uninstall specific version installed with allow_multiple
assert: # - name: assert uninstall specific version installed with allow_multiple
that: # assert:
- remove_multiple is changed # that:
- '"ansible|0.0.1" not in remove_multiple_actual.stdout_lines' # - remove_multiple is changed
- '"ansible|0.1.0" in remove_multiple_actual.stdout_lines' # - '"ansible|0.0.1" not in remove_multiple_actual.stdout_lines'
# - '"ansible|0.1.0" in remove_multiple_actual.stdout_lines'

Loading…
Cancel
Save