Skip to content

Commit 3331840

Browse files
committed
fix lint
1 parent 8f4c034 commit 3331840

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

source/logrepl/cdc_test.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,10 @@ func TestCDCIterator_NextN(t *testing.T) {
520520
is.Equal(r.Operation, opencdc.OperationCreate)
521521
is.Equal(r.Key.(opencdc.StructuredData)["id"], int64(j+11))
522522
change := r.Payload
523-
payload := change.After.(opencdc.StructuredData)
524-
is.Equal(payload["column1"], fmt.Sprintf("test-%d", j+1))
525-
is.Equal(payload["column2"], int32((j+1)*100))
523+
data := change.After.(opencdc.StructuredData)
524+
is.Equal(data["column1"], fmt.Sprintf("test-%d", j+1))
525+
//nolint:gosec // no risk to overflow
526+
is.Equal(data["column2"], (int32(j)+1)*100)
526527
}
527528
})
528529

@@ -549,8 +550,10 @@ func TestCDCIterator_NextN(t *testing.T) {
549550
is.Equal(r.Operation, opencdc.OperationCreate)
550551
is.Equal(r.Key.(opencdc.StructuredData)["id"], int64(j+21))
551552
change := r.Payload
552-
payload := change.After.(opencdc.StructuredData)
553-
is.Equal(payload["column1"], fmt.Sprintf("test-%d", j+1))
553+
data := change.After.(opencdc.StructuredData)
554+
is.Equal(data["column1"], fmt.Sprintf("test-%d", j+1))
555+
//nolint:gosec // no risk to overflow
556+
is.Equal(data["column2"], (int32(j)+1)*100)
554557
}
555558
})
556559

0 commit comments

Comments
 (0)