snap: detect change by checking final state (#7340)

* snap: detect change by checking final state

* detect change in snap_status variable

* add changelog frag
This commit is contained in:
Alexei Znamensky 2023-10-08 23:03:31 +13:00 committed by GitHub
parent 324c22f612
commit 323a1dcff8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 19 deletions

View file

@ -402,6 +402,19 @@ TEST_CASES = [
out="hello-world (12345/stable) v12345 from Canonical** installed\n",
err="",
),
RunCmdCall(
command=['/testbin/snap', 'list'],
environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
rc=0,
out=(
"Name Version Rev Tracking Publisher Notes"
"core20 20220826 1623 latest/stable canonical** base"
"lxd 5.6-794016a 23680 latest/stable/… canonical** -"
"hello-world 5.6-794016a 23680 latest/stable/… canonical** -"
"snapd 2.57.4 17336 latest/stable canonical** snapd"
""),
err="",
),
]
),
ModuleTestCase(
@ -438,6 +451,20 @@ TEST_CASES = [
out=issue_6803_kubectl_out,
err="",
),
RunCmdCall(
command=['/testbin/snap', 'list'],
environ={'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
rc=0,
out=(
"Name Version Rev Tracking Publisher Notes"
"core20 20220826 1623 latest/stable canonical** base"
"lxd 5.6-794016a 23680 latest/stable/… canonical** -"
"microk8s 5.6-794016a 23680 latest/stable/… canonical** -"
"kubectl 5.6-794016a 23680 latest/stable/… canonical** -"
"snapd 2.57.4 17336 latest/stable canonical** snapd"
""),
err="",
),
]
),
]