From 227253b960e92b7ea54df351ab975508fc7e46c8 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Tue, 23 Jul 2024 11:35:53 -0700 Subject: [PATCH] Clean up. --- lib/dynamo/message_test.go | 3 ++- scripts/dynamo/load.go | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/dynamo/message_test.go b/lib/dynamo/message_test.go index ed0ee4e9..b2e5580b 100644 --- a/lib/dynamo/message_test.go +++ b/lib/dynamo/message_test.go @@ -41,10 +41,11 @@ func TestTransformAttributeValue(t *testing.T) { actualValue, fieldType, err := transformAttributeValue(&dynamodb.AttributeValue{ BS: [][]byte{ []byte("hello"), + []byte("world"), }, }) assert.NoError(t, err, err) - assert.Equal(t, [][]byte{[]byte("hello")}, actualValue) + assert.Equal(t, [][]byte{[]byte("hello"), []byte("world")}, actualValue) assert.Equal(t, debezium.Array, fieldType) } { diff --git a/scripts/dynamo/load.go b/scripts/dynamo/load.go index d911380b..e9a2bc1b 100644 --- a/scripts/dynamo/load.go +++ b/scripts/dynamo/load.go @@ -53,6 +53,12 @@ func main() { "user_id": { S: aws.String(userID), }, + "b": { + B: []byte("hello world"), + }, + "bs": { + BS: [][]byte{[]byte("hello"), []byte("world")}, + }, "random_number": { N: aws.String(fmt.Sprintf("%v", rand.Int63())), // Example number },