Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions tests/lib/nested.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1899,13 +1899,15 @@ nested_del_device() {
echo "device deleted"
}

nested_get_core_revision_for_channel() {
local CHANNEL=$1
remote.exec "snap info core" | awk "/${CHANNEL}: / {print(\$4)}" | sed -e 's/(\(.*\))/\1/'
nested_get_snap_revision_for_channel() {
local SNAP=$1
local CHANNEL=$2
remote.exec "snap info $SNAP" | awk "/${CHANNEL}: / {print(\$4)}" | sed -e 's/(\(.*\))/\1/'
}

nested_get_core_revision_installed() {
remote.exec "snap info core" | awk "/installed: / {print(\$3)}" | sed -e 's/(\(.*\))/\1/'
nested_get_snap_revision_installed() {
local SNAP=$1
remote.exec "snap info $SNAP" | awk "/installed: / {print(\$3)}" | sed -e 's/(\(.*\))/\1/'
}

nested_fetch_spread() {
Expand Down
18 changes: 9 additions & 9 deletions tests/nested/manual/refresh-revert-fundamentals/task.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
summary: Refresh and revert the fundamental snaps for uc20
summary: Refresh and revert the fundamental snaps for uc24

details: |
This test validates the fundamental snaps can be refreshed
and reverted to the new snaps published to edge channel.

systems: [ubuntu-2*]
systems: [ubuntu-24*]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the decision based on here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this because it was being skipped based on 20/edge and 20/beta channels and it was skipped.
I think we need to change this test to use the default track of the current uc, instead of hard-coding it in the TRACK var.


environment:
NESTED_CORE_CHANNEL: beta
Expand All @@ -15,15 +15,15 @@ environment:
NESTED_ENABLE_TPM: true

SNAP/kernel: pc-kernel
TRACK/kernel: 20
TRACK/kernel: 24

SNAP/gadget: pc
TRACK/gadget: 20
TRACK/gadget: 24

SNAP/snapd: snapd
TRACK/snapd: latest

SNAP/base: core20
SNAP/base: core24
TRACK/base: latest

skip:
Expand Down Expand Up @@ -59,7 +59,7 @@ execute: |
remote.exec "snap watch $REFRESH_ID" || true
remote.exec "sudo reboot" || true
;;
pc-kernel|core20)
pc-kernel|core24)
# don't manually reboot, wait for automatic snapd reboot
;;
esac
Expand All @@ -71,7 +71,7 @@ execute: |

echo "Check the change is completed"
case "$SNAP" in
pc-kernel|core20)
pc-kernel|core24)
#shellcheck disable=SC2098
#shellcheck disable=SC2097
retry --wait 1 -n 10 --env REFRESH_ID="$REFRESH_ID" sh -c "remote.exec snap changes | MATCH \"$REFRESH_ID\s+Done\s+.*\""
Expand All @@ -90,7 +90,7 @@ execute: |
remote.exec "snap watch $REVERT_ID" || true
remote.exec "sudo reboot" || true
;;
pc-kernel|core20)
pc-kernel|core24)
# don't manually reboot, wait for automatic snapd reboot
;;
esac
Expand All @@ -101,7 +101,7 @@ execute: |

echo "Check the change is completed"
case "$SNAP" in
pc-kernel|core20)
pc-kernel|core24)
retry --wait 1 -n 10 --env REVERT_ID="$REVERT_ID" sh -c "remote.exec snap changes | MATCH \"$REVERT_ID\s+Done\s+.*\""
;;
esac
Loading