Skip to content

Commit

Permalink
evetestkit : fix panic on EveDeployApp
Browse files Browse the repository at this point in the history
Append new app to the list before start applying options.

Signed-off-by: Shahriyar Jalayeri <[email protected]>
  • Loading branch information
shjala committed Nov 11, 2024
1 parent 1ba5e8b commit f99c560
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/evetestkit/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ func (node *EveNode) EveRebootAndWait(timeoutSeconds uint) error {
// EveDeployApp deploys a VM/App on the EVE node
func (node *EveNode) EveDeployApp(appLink string, destructiveUse bool, pc openevec.PodConfig, options ...AppOption) error {
app := appInstanceConfig{name: pc.Name, destructiveUse: destructiveUse}
node.apps = append(node.apps, app)

for _, option := range options {
option(node, pc.Name)
}
Expand All @@ -507,7 +509,6 @@ func (node *EveNode) EveDeployApp(appLink string, destructiveUse bool, pc openev
}
}

node.apps = append(node.apps, app)
return node.controller.PodDeploy(appLink, pc, node.cfg)
}

Expand Down

0 comments on commit f99c560

Please sign in to comment.