Skip to content

Commit

Permalink
Call set_grub_uefi_root to override the grub path in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmcanonical committed Feb 10, 2025
1 parent 8636f01 commit f641b78
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

. $SHARED/grub2.sh

set_grub_uefi_root

make_grub_password

set_superusers "use r"
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@

. $SHARED/grub2.sh

set_grub_uefi_root

touch "$GRUB_CFG_ROOT/grub.cfg"
rm -f "$GRUB_CFG_ROOT/user.cfg"
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

. $SHARED/grub2.sh

set_grub_uefi_root

make_grub_password
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

. $SHARED/grub2.sh

set_grub_uefi_root

make_grub_password

set_superusers_unquoted "koksic"
2 changes: 2 additions & 0 deletions tests/shared/grub2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ function set_grub_uefi_root {
fi
elif grep NAME /etc/os-release | grep -iq "Oracle"; then
GRUB_CFG_ROOT=/boot/efi/EFI/redhat
elif grep NAME /etc/os-release | grep -iq "Ubuntu"; then
GRUB_CFG_ROOT=/boot/grub
fi
}

Expand Down

0 comments on commit f641b78

Please sign in to comment.