Skip to content

Commit cc665c6

Browse files
committed
fix comments
1 parent 9316584 commit cc665c6

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

cni/network/plugin/main.go

-2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ func rootExecute() error {
186186
upTime, err = p.GetLastRebootTime()
187187
if err == nil {
188188
cniReport.VMUptime = upTime.Format("2006-01-02 15:04:05")
189-
} else {
190-
logger.Error("Failed to query last reboot time", zap.Error(err))
191189
}
192190

193191
// CNI Acquires lock

cni/telemetry/service/telemetrymain.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ func main() {
127127

128128
logger.Info("Config path", zap.String("path", configPath))
129129

130+
tb = telemetry.NewTelemetryBuffer(logger)
130131
config, err = tb.ReadConfigFile(configPath)
131132
if err != nil {
132133
logger.Error("Error reading telemetry config", zap.Error(err))
@@ -142,8 +143,6 @@ func main() {
142143
tbtemp := telemetry.NewTelemetryBuffer(logger)
143144
tbtemp.Cleanup(telemetry.FdName)
144145

145-
tb = telemetry.NewTelemetryBuffer(logger)
146-
147146
for {
148147
logger.Info("Starting telemetry server")
149148
err = tb.StartServer()

platform/os_windows_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func TestExecuteCommand(t *testing.T) {
9191
}
9292

9393
func TestExecuteCommandError(t *testing.T) {
94-
_, err := NewExecClient().ExecuteCommand("dontaddtopath")
94+
_, err := NewExecClient(nil).ExecuteCommand("dontaddtopath")
9595
require.Error(t, err)
9696

9797
var xErr *exec.ExitError

0 commit comments

Comments
 (0)