File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
tests/kola/upgrade/extended Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,23 @@ selinux-sanity-check() {
244
244
245
245
ok " Reached version: $version "
246
246
247
+ verify-alternatives-migration () {
248
+ # Verify /var/lib/alternatives dir is removed
249
+ if [[ -e /var/lib/alternatives ]]; then
250
+ fatal " Error: migration didn't remove /var/lib/alternatives"
251
+ fi
252
+
253
+ # Verify iptables migration
254
+ if [[ $( alternatives --display iptables | grep -c -E ' link currently points to /usr/(bin|sbin)/iptables-nft' ) != " 1" ]]; then
255
+ fatal " Error: migration did not set iptables to nft backend"
256
+ fi
257
+ if [[ $( iptables --version | grep -c " nf_tables" ) != " 1" ]]; then
258
+ fatal " Error: iptables not reset to nftables backend"
259
+ fi
260
+
261
+ ok " alternatives migration verification passed."
262
+ }
263
+
247
264
# Are we all the way at the desired target version?
248
265
# If so then we can exit with success!
249
266
if vereq $version $target_version ; then
@@ -256,6 +273,8 @@ if vereq $version $target_version; then
256
273
fi
257
274
# One last check!
258
275
selinux-sanity-check
276
+ # One more last check
277
+ verify-alternatives-migration
259
278
exit 0
260
279
fi
261
280
You can’t perform that action at this time.
0 commit comments