Skip to content

Commit

Permalink
evetestkit: detect app halting state
Browse files Browse the repository at this point in the history
Signed-off-by: Shahriyar Jalayeri <[email protected]>
  • Loading branch information
shjala committed Sep 13, 2024
1 parent d8f8103 commit c10614b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion pkg/evetestkit/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@ func (node *EveNode) AppWaitForRunningState(appName string, timeoutSeconds uint)
if err != nil {
return err
}
state = strings.ToLower(state)

if strings.ToLower(state) == "running" {
if strings.Contains(state, "halting") {
return fmt.Errorf("app %s is in halting state", appName)
}

if state == "running" {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions tests/vcom/vcom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ func decodeError(data []byte) (*vcom.Error, error) {
}

func TestMain(m *testing.M) {
log.Println("VCOM Test started")
defer log.Println("VCOM Test finished")
log.Println("vComLink Test started")
defer log.Println("vComLink Test finished")

node, err := tk.InitilizeTest(projectName, tk.WithControllerVerbosity("warn"))
if err != nil {
Expand Down

0 comments on commit c10614b

Please sign in to comment.