Skip to content

Commit

Permalink
Remove second err
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Jul 23, 2024
1 parent b3084e2 commit c842e0c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/dynamo/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestTransformAttributeValue(t *testing.T) {
actualValue, fieldType, err := transformAttributeValue(&dynamodb.AttributeValue{
S: ptr.ToString("hello"),
})
assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, "hello", actualValue)
assert.Equal(t, debezium.String, fieldType)
}
Expand All @@ -23,7 +23,7 @@ func TestTransformAttributeValue(t *testing.T) {
actualValue, fieldType, err := transformAttributeValue(&dynamodb.AttributeValue{
N: ptr.ToString("123"),
})
assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, float64(123), actualValue)
assert.Equal(t, debezium.Float, fieldType)
}
Expand All @@ -32,7 +32,7 @@ func TestTransformAttributeValue(t *testing.T) {
actualValue, fieldType, err := transformAttributeValue(&dynamodb.AttributeValue{
B: []byte("hello"),
})
assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, []byte("hello"), actualValue)
assert.Equal(t, debezium.Bytes, fieldType)
}
Expand All @@ -44,7 +44,7 @@ func TestTransformAttributeValue(t *testing.T) {
[]byte("world"),
},
})
assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, [][]byte{[]byte("hello"), []byte("world")}, actualValue)
assert.Equal(t, debezium.Array, fieldType)
}
Expand All @@ -53,7 +53,7 @@ func TestTransformAttributeValue(t *testing.T) {
actualValue, fieldType, err := transformAttributeValue(&dynamodb.AttributeValue{
BOOL: ptr.ToBool(true),
})
assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, true, actualValue)
assert.Equal(t, debezium.Boolean, fieldType)
}
Expand All @@ -77,7 +77,7 @@ func TestTransformAttributeValue(t *testing.T) {
},
})

assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, map[string]any{
"foo": "bar",
"bar": float64(123),
Expand Down Expand Up @@ -107,7 +107,7 @@ func TestTransformAttributeValue(t *testing.T) {
},
})

assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, []any{
"foo",
float64(123),
Expand All @@ -126,7 +126,7 @@ func TestTransformAttributeValue(t *testing.T) {
},
})

assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, []string{"foo", "bar"}, actualValue)
assert.Equal(t, debezium.Array, fieldType)
}
Expand All @@ -139,7 +139,7 @@ func TestTransformAttributeValue(t *testing.T) {
},
})

assert.NoError(t, err, err)
assert.NoError(t, err)
assert.Equal(t, []float64{123, 456}, actualValue)
assert.Equal(t, debezium.Array, fieldType)
}
Expand Down

0 comments on commit c842e0c

Please sign in to comment.