Skip to content

Commit

Permalink
tests: console: bootloader expecters: give the VMI enough time to start
Browse files Browse the repository at this point in the history
Signed-off-by: Jed Lejosne <[email protected]>
  • Loading branch information
jean-edouard committed Jun 10, 2022
1 parent 1fe20bb commit 52e2354
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,13 @@ func RunCommand(vmi *v1.VirtualMachineInstance, command string, timeout time.Dur

// SecureBootExpecter should be called on a VMI that has EFI enabled
// It will parse the kernel output (dmesg) and succeed if it finds that Secure boot is enabled
// The VMI was just created and may not be running yet. This is because we want to catch early boot logs.
func SecureBootExpecter(vmi *v1.VirtualMachineInstance) error {
virtClient, err := kubecli.GetKubevirtClient()
if err != nil {
return err
}
expecter, _, err := NewExpecter(virtClient, vmi, 10*time.Second)
expecter, _, err := NewExpecter(virtClient, vmi, 30*time.Second)
if err != nil {
return err
}
Expand All @@ -156,12 +157,13 @@ func SecureBootExpecter(vmi *v1.VirtualMachineInstance) error {

// NetBootExpecter should be called on a VMI that has BIOS serial logging enabled
// It will parse the SeaBIOS output and succeed if it finds the string "iPXE"
// The VMI was just created and may not be running yet. This is because we want to catch early boot logs.
func NetBootExpecter(vmi *v1.VirtualMachineInstance) error {
virtClient, err := kubecli.GetKubevirtClient()
if err != nil {
return err
}
expecter, _, err := NewExpecter(virtClient, vmi, 10*time.Second)
expecter, _, err := NewExpecter(virtClient, vmi, 30*time.Second)
if err != nil {
return err
}
Expand Down

0 comments on commit 52e2354

Please sign in to comment.