Skip to content

Commit

Permalink
ci: use time param for reboot (#591)
Browse files Browse the repository at this point in the history
Currently we had the reboot function on SUT with a hardcoded timeout
which was hitting its limits on the raw disk test

This modifies the reboot function so it acceps a timeout and passes it
to the EventuallyConnects function

Signed-off-by: Itxaka <igarcia@suse.com>
  • Loading branch information
Itxaka authored Sep 2, 2021
1 parent 6efadb8 commit 930b096
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/recovery-raw-disk/recovery_raw_disk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var _ = Describe("cOS Recovery deploy tests", func() {
err = s.ChangeBoot(sut.Active)
Expect(err).ToNot(HaveOccurred())

s.Reboot()
s.Reboot(sut.TimeoutRawDiskTest)
ExpectWithOffset(1, s.BootFrom()).To(Equal(sut.Active))
})
})
Expand Down
4 changes: 2 additions & 2 deletions tests/sut/sut.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ func (s *SUT) command(cmd string, timeout bool) (string, error) {
}

// Reboot reboots the system under test
func (s *SUT) Reboot() {
func (s *SUT) Reboot(t ...int) {
s.command("reboot", true)
time.Sleep(10 * time.Second)
s.EventuallyConnects(180)
s.EventuallyConnects(t...)
}

func (s *SUT) clientConfig() *ssh.ClientConfig {
Expand Down

0 comments on commit 930b096

Please sign in to comment.