diff --git a/litmus-portal/cluster-agents/subscriber/pkg/events/util.go b/litmus-portal/cluster-agents/subscriber/pkg/events/util.go index 4acd2b2c0f7..1a5326b44a6 100644 --- a/litmus-portal/cluster-agents/subscriber/pkg/events/util.go +++ b/litmus-portal/cluster-agents/subscriber/pkg/events/util.go @@ -15,7 +15,6 @@ import ( "github.com/litmuschaos/litmus/litmus-portal/cluster-agents/subscriber/pkg/types" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/serializer/yaml" ) @@ -35,9 +34,15 @@ func getChaosData(nodeStatus v1alpha13.NodeStatus, engineName, engineNS string, cd.ProbeSuccessPercentage = "0" cd.FailStep = "" cd.EngineUID = string(crd.ObjectMeta.UID) + + if strings.ToLower(string(crd.Status.EngineStatus)) == "stopped" { + cd.ExperimentVerdict = "Fail" + cd.ExperimentStatus = string(crd.Status.EngineStatus) + } if len(crd.Status.Experiments) == 0 { return cd, nil } + // considering chaosengine will only have 1 experiment cd.ExperimentPod = crd.Status.Experiments[0].ExpPod cd.RunnerPod = crd.Status.Experiments[0].Runner