1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
summary: Check install popular snaps
details: |
This test is intended to install some popular snaps from
different channels. The idea is to detect any problem
installing that are currently published and some of them
with many revisions.
The execution of this test is made on the nightly build.
environment:
# High Profile
SNAP/azurecli: azure-cli
SNAP/awscli: aws-cli
SNAP/heroku: heroku
SNAP/hiri: hiri
SNAP/kubectl: kubectl
SNAP/rocketchatserver: rocketchat-server
# Selected from recent insights posts
SNAP/corebird: corebird
SNAP/gitterdesktop: gitter-desktop
SNAP/helm: helm
SNAP/mattermostdesktop: mattermost-desktop
SNAP/mentaplexmediaserver: menta-plexmediaserver
SNAP/openspades: openspades
SNAP/pintown: pin-town
SNAP/postgresql10: postgresql10
SNAP/storjshare: storjshare
SNAP/slackterm: slack-term
SNAP/vectr: vectr
SNAP/wekan: wekan
SNAP/wormhole: wormhole
# Featured snaps in Ubuntu Software
SNAP/anboxinstaller: anbox-installer
SNAP/lxd: lxd
# Top non canonical snaps
SNAP/atom: atom
SNAP/discord: discord
SNAP/docker: docker
SNAP/etcd: etcd
SNAP/geocoder: geocoder
SNAP/gimp: gimp
SNAP/huggle: huggle
SNAP/hugo: hugo
SNAP/ia: ia
SNAP/kurly: kurly
SNAP/micro: micro
SNAP/nikola: nikola
SNAP/parity: parity
SNAP/paritybitcoin: parity-bitcoin
SNAP/remmina: remmina
SNAP/skype: skype
SNAP/slack: slack
SNAP/spotify: spotify
SNAP/telegramsergiusens: telegram-sergiusens
SNAP/zeronet: zeronet
SNAP/zeronetjs: zeronet-js
# Top canonical snaps
SNAP/bare: bare
SNAP/bluez: bluez
SNAP/conjureup: conjure-up
SNAP/gedit: gedit
SNAP/go: go
SNAP/juju: juju
SNAP/neutron: neutron
SNAP/nova: nova
SNAP/snapcraft: snapcraft
SNAP/solc: solc
SNAP/vault: vault
prepare: |
cp /etc/systemd/system/snapd.service.d/local.conf /etc/systemd/system/snapd.service.d/local.conf.bak
sed 's/SNAPD_CONFIGURE_HOOK_TIMEOUT=.*s/SNAPD_CONFIGURE_HOOK_TIMEOUT=180s/g' -i /etc/systemd/system/snapd.service.d/local.conf
systemctl daemon-reload
systemctl restart snapd.socket
if [ ! -d '/snap' ]; then
SNAP_MOUNT_DIR="$(os.paths snap-mount-dir)"
ln -s "$SNAP_MOUNT_DIR" /snap
fi
restore: |
mv /etc/systemd/system/snapd.service.d/local.conf.bak /etc/systemd/system/snapd.service.d/local.conf
systemctl daemon-reload
systemctl restart snapd.socket
if [ -L /snap ]; then
unlink /snap
fi
if [ "$SNAP" = lxd ]; then
"$TESTSTOOLS"/lxd-state undo-mount-changes
fi
execute: |
CHANNELS="stable candidate beta edge"
for CHANNEL in $CHANNELS; do
# shellcheck disable=SC2153
if ! CHANNEL_INFO="$(snap info --unicode=never "$SNAP" | grep " $CHANNEL: ")"; then
echo "Snap $SNAP not found"
exit
fi
if echo "$CHANNEL_INFO" | MATCH "$CHANNEL:.*--"; then
continue
fi
if echo "$CHANNEL_INFO" | MATCH "$CHANNEL:.*classic"; then
if "$TESTSTOOLS"/snaps-state is-confinement-supported classic; then
snap install "$SNAP" "--$CHANNEL" --classic
else
echo "The snap $SNAP requires classic confinement which is not supported yet"
exit
fi
elif echo "$CHANNEL_INFO" | MATCH "$CHANNEL:.*jailmode"; then
snap install "$SNAP" "--$CHANNEL" --jailmode
elif echo "$CHANNEL_INFO" | MATCH "$CHANNEL:.*devmode"; then
snap install "$SNAP" "--$CHANNEL" --devmode
else
snap install "$SNAP" "--$CHANNEL"
fi
break
done
echo "Check the snap is properly installed"
snap list | MATCH "$SNAP"
echo "Check the snap is properly removed"
snap remove --purge "$SNAP"
if snap list | MATCH "$SNAP"; then
echo "Snap $SNAP not removed properly"
exit 1
fi
|