From f99c560ddf9f581d91f3c415f505a7af22499e06 Mon Sep 17 00:00:00 2001 From: Shahriyar Jalayeri Date: Mon, 11 Nov 2024 12:28:33 +0200 Subject: [PATCH] evetestkit : fix panic on EveDeployApp Append new app to the list before start applying options. Signed-off-by: Shahriyar Jalayeri --- pkg/evetestkit/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/evetestkit/utils.go b/pkg/evetestkit/utils.go index 64a530f10..8d4dd522f 100644 --- a/pkg/evetestkit/utils.go +++ b/pkg/evetestkit/utils.go @@ -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) } @@ -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) }