[VOL-3069]Pass Context in methods which are performing logging and need the context
Change-Id: Ie84f9e240aa4f47d0046acaac0d82d21b17252e5
diff --git a/internal/pkg/core/statsmanager_test.go b/internal/pkg/core/statsmanager_test.go
index f7f8246..67b9a6a 100644
--- a/internal/pkg/core/statsmanager_test.go
+++ b/internal/pkg/core/statsmanager_test.go
@@ -18,6 +18,7 @@
package core
import (
+ "context"
"fmt"
"github.com/opencord/voltha-protos/v3/go/openolt"
"github.com/opencord/voltha-protos/v3/go/voltha"
@@ -44,7 +45,7 @@
}
dh := newMockDeviceHandler()
dh.device = device
- StatMgr := NewOpenOltStatsMgr(dh)
+ StatMgr := NewOpenOltStatsMgr(context.Background(), dh)
type args struct {
PortStats *openolt.PortStatistics
@@ -59,7 +60,7 @@
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- StatMgr.PortStatisticsIndication(tt.args.PortStats, 16)
+ StatMgr.PortStatisticsIndication(context.Background(), tt.args.PortStats, 16)
})
}
}
@@ -168,7 +169,7 @@
NorthBoundPort: tt.fields.NorthBoundPort,
SouthBoundPort: tt.fields.SouthBoundPort,
}
- StatMgr.publishMetrics(tt.args.val, tt.args.port, "onu1", "openolt")
+ StatMgr.publishMetrics(context.Background(), tt.args.val, tt.args.port, "onu1", "openolt")
})
}
}