Skip to content

Commit

Permalink
Merge branch 'master' into core20-preseed/wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
stolowski committed Feb 24, 2022
2 parents 08141cf + 9f1a953 commit 0a4f460
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
17 changes: 10 additions & 7 deletions tests/lib/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,16 @@ prepare_classic() {

disable_refreshes

echo "Ensure that the bootloader environment output does not contain any of the snap_* variables on classic"
# shellcheck disable=SC2119
output=$("$TESTSTOOLS"/boot-state bootenv show)
if echo "$output" | MATCH snap_ ; then
echo "Expected bootloader environment without snap_*, got:"
echo "$output"
exit 1
# Check bootloader environment output in architectures different to s390x which uses zIPL
if ! [ "$(uname -m)" = "s390x" ]; then
echo "Ensure that the bootloader environment output does not contain any of the snap_* variables on classic"
# shellcheck disable=SC2119
output=$("$TESTSTOOLS"/boot-state bootenv show)
if echo "$output" | MATCH snap_ ; then
echo "Expected bootloader environment without snap_*, got:"
echo "$output"
exit 1
fi
fi

setup_experimental_features
Expand Down
12 changes: 10 additions & 2 deletions tests/main/interfaces-network-manager/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ systems:
- ubuntu-core-20-64

prepare: |
echo "Give a network-manager snap is installed"
echo "Given a network-manager snap is installed"
if os.query is-core16; then
snap install --channel=latest network-manager
elif os.query is-core18; then
snap install --channel=1.10 network-manager
else
snap install --channel=20 network-manager
fi
snap install network-manager
execute: |
Expand All @@ -34,7 +42,7 @@ execute: |
done
echo "The interface is connected by default"
snap interfaces -i network-manager | MATCH "network-manager:service .*network-manager:nmcli"
snap connections network-manager | MATCH "network-manager:nmcli *network-manager:service"
echo "And allows to add a new connection"
conn_name=nmtest
Expand Down
10 changes: 8 additions & 2 deletions tests/smoke/install/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ execute: |
echo "Ensure different bases work"
for base in core18 core20 core22; do
# no core20 or core22 snap for i386
if { [ "$base" = "core20" ] || [ "$base" = "core22" ]; } && [ "$(uname -m)" = i686 ]; then
# TODO remove this logic once core22 base snaps are uploaded in
# all the supported architectures
if [ "$base" = "core22" ] && not os.query is-pc-amd64; then
continue
fi
# no core20 snap for i386 architecture
if [ "$base" = "core20" ] && os.query is-pc-i386; then
continue
fi
Expand Down

0 comments on commit 0a4f460

Please sign in to comment.