Skip to content

Commit

Permalink
tests: avoid using shell struct in CheckCRCStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
jsliacan committed Oct 2, 2023
1 parent 43c776a commit e5a8ab9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/extended/crc/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,14 @@ func CheckCRCStatus(state string) error {
expression = `.*CRC VM:.*\s.*: .*Stopped.*`
}

err := util.ExecuteCommand(CRC("status").ToString())
cmd := exec.Command("crc", "status")
out, err := cmd.Output()
if err != nil {
return err
}
return util.CommandReturnShouldMatch("stdout", expression)

err = util.CompareExpectedWithActualMatchesRegex(expression, string(out))
return err
}

func CheckCRCExecutableState(state string) error {
Expand Down

0 comments on commit e5a8ab9

Please sign in to comment.