[PR #6835/dc0d0045 backport][stable-7] snap: add track 'latest' if no track is specified (#6888)

snap: add track 'latest' if no track is specified (#6835)

* snap: add track 'latest' if no track is specified

See https://snapcraft.io/docs/channels for more details.

* snap: assume track latest if channel does not specify it

(cherry picked from commit dc0d00452f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2023-07-08 18:09:28 +02:00 committed by GitHub
commit eccc41eadc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 1 deletions

View file

@ -44,3 +44,36 @@
- install_microk8s_chan is changed
- install_microk8s_chan_again is not changed
- remove_microk8s is changed
- name: Install package (shellcheck)
community.general.snap:
name: shellcheck
state: present
register: install_shellcheck
- name: Install package with channel (shellcheck)
community.general.snap:
name: shellcheck
channel: edge
state: present
register: install_shellcheck_chan
- name: Install package with channel (shellcheck) again
community.general.snap:
name: shellcheck
channel: edge
state: present
register: install_shellcheck_chan_again
- name: Remove package (shellcheck)
community.general.snap:
name: shellcheck
state: absent
register: remove_shellcheck
- assert:
that:
- install_shellcheck is changed
- install_shellcheck_chan is changed
- install_shellcheck_chan_again is not changed
- remove_shellcheck is changed