From 09b0aab538aa6278dd65ba5bbca0c7d44094c0ce Mon Sep 17 00:00:00 2001 From: Sujal Gupta <55016909+heysujal@users.noreply.github.com> Date: Sat, 28 Dec 2024 23:41:05 +0530 Subject: [PATCH] use revertErr instead of err --- chaoslib/litmus/network-chaos/helper/netem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chaoslib/litmus/network-chaos/helper/netem.go b/chaoslib/litmus/network-chaos/helper/netem.go index 88b02ec6f..415039c44 100644 --- a/chaoslib/litmus/network-chaos/helper/netem.go +++ b/chaoslib/litmus/network-chaos/helper/netem.go @@ -130,7 +130,7 @@ func preparePodNetworkChaos(experimentsDetails *experimentTypes.ExperimentDetail } log.Infof("successfully injected chaos on target: {name: %s, namespace: %v, container: %v}", t.Name, t.Namespace, t.TargetContainer) if err = result.AnnotateChaosResult(resultDetails.Name, chaosDetails.ChaosNamespace, "injected", "pod", t.Name); err != nil { - if _, revertErr := killnetem(t, experimentsDetails.NetworkInterface); err != nil { + if _, revertErr := killnetem(t, experimentsDetails.NetworkInterface); revertErr != nil { return cerrors.PreserveError{ErrString: fmt.Sprintf("[%s,%s]", stacktrace.RootCause(err).Error(), stacktrace.RootCause(revertErr).Error())} } return stacktrace.Propagate(err, "could not annotate chaosresult")