瀏覽代碼

d/l/awslogs: fix ineffective Add in test

...flagged by golangci-lint v1.51.1 (staticcheck).

Signed-off-by: Cory Snider <csnider@mirantis.com>
Cory Snider 2 年之前
父節點
當前提交
e66995d840
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      daemon/logger/awslogs/cloudwatchlogs_test.go

+ 1 - 1
daemon/logger/awslogs/cloudwatchlogs_test.go

@@ -1446,7 +1446,7 @@ func TestCollectBatchWithDuplicateTimestamps(t *testing.T) {
 	for i := 0; i < times; i++ {
 		line := strconv.Itoa(i)
 		if i%2 == 0 {
-			timestamp.Add(1 * time.Nanosecond)
+			timestamp = timestamp.Add(1 * time.Nanosecond)
 		}
 		stream.Log(&logger.Message{
 			Line:      []byte(line),