diff --git a/lib/dynamo/message_test.go b/lib/dynamo/message_test.go index 5ec6438f..ed0ee4e9 100644 --- a/lib/dynamo/message_test.go +++ b/lib/dynamo/message_test.go @@ -27,6 +27,26 @@ func TestTransformAttributeValue(t *testing.T) { assert.Equal(t, float64(123), actualValue) assert.Equal(t, debezium.Float, fieldType) } + { + // Bytes + actualValue, fieldType, err := transformAttributeValue(&dynamodb.AttributeValue{ + B: []byte("hello"), + }) + assert.NoError(t, err, err) + assert.Equal(t, []byte("hello"), actualValue) + assert.Equal(t, debezium.Bytes, fieldType) + } + { + // Bytes set + actualValue, fieldType, err := transformAttributeValue(&dynamodb.AttributeValue{ + BS: [][]byte{ + []byte("hello"), + }, + }) + assert.NoError(t, err, err) + assert.Equal(t, [][]byte{[]byte("hello")}, actualValue) + assert.Equal(t, debezium.Array, fieldType) + } { // Boolean actualValue, fieldType, err := transformAttributeValue(&dynamodb.AttributeValue{