diff --git a/go.mod b/go.mod index b504a342..89c82b97 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22 require ( github.com/DataDog/datadog-go v4.8.3+incompatible - github.com/artie-labs/transfer v1.25.2 + github.com/artie-labs/transfer v1.25.4 github.com/aws/aws-sdk-go v1.44.327 github.com/aws/aws-sdk-go-v2 v1.18.1 github.com/aws/aws-sdk-go-v2/config v1.18.19 diff --git a/go.sum b/go.sum index 5b017b46..9ba8fd07 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/apache/thrift v0.0.0-20181112125854-24918abba929/go.mod h1:cp2SuWMxlE github.com/apache/thrift v0.14.2/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/artie-labs/transfer v1.25.2 h1:erRFqFwHQa2whTk6qpsHTE6UT72ybK0Mj+H8K91Sw8k= -github.com/artie-labs/transfer v1.25.2/go.mod h1:cbshXx1+L+LAZ+38/VR30jiOUt01mXfk1yu4i9cBaCE= +github.com/artie-labs/transfer v1.25.4 h1:O70TA5i8Ds/hJZqksJ9/t6uJti8GPAVmkFR4gquUQ1I= +github.com/artie-labs/transfer v1.25.4/go.mod h1:cbshXx1+L+LAZ+38/VR30jiOUt01mXfk1yu4i9cBaCE= github.com/aws/aws-sdk-go v1.30.19/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.44.327 h1:ZS8oO4+7MOBLhkdwIhgtVeDzCeWOlTfKJS7EgggbIEY= github.com/aws/aws-sdk-go v1.44.327/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= diff --git a/writers/transfer/writer_test.go b/writers/transfer/writer_test.go index f22b56f1..0f7ba898 100644 --- a/writers/transfer/writer_test.go +++ b/writers/transfer/writer_test.go @@ -1,10 +1,6 @@ package transfer import ( - "context" - "github.com/artie-labs/reader/lib" - "github.com/artie-labs/reader/lib/mocks" - "github.com/artie-labs/transfer/lib/cdc/util" "testing" transferCfg "github.com/artie-labs/transfer/lib/config" @@ -52,41 +48,3 @@ func TestWriter_MessageToEvent(t *testing.T) { assert.Equal(t, map[string]any{"_id": objId.Hex()}, evtOut.PrimaryKeyMap) } - -func TestWriter_Write(t *testing.T) { - var rawMsgs []lib.RawMessage - for range 100 { - rawMsgs = append(rawMsgs, lib.NewRawMessage( - "topic-suffix", - map[string]any{"key": "value"}, - &util.SchemaEventPayload{ - Payload: util.Payload{ - After: map[string]any{"a": "b"}, - Source: util.Source{ - TsMs: 1000, - Table: "table", - }, - Operation: "c", - }, - }, - )) - } - - writer, err := NewWriter(transferCfg.Config{ - Mode: transferCfg.Replication, - Output: "test", - Kafka: &transferCfg.Kafka{ - TopicConfigs: []*kafkalib.TopicConfig{ - { - TableName: "table", - }, - }, - }, - }, &mocks.FakeClient{}) - assert.NoError(t, err) - - assert.Nil(t, writer.primaryKeys) - assert.NoError(t, writer.Write(context.Background(), rawMsgs)) - assert.Len(t, writer.primaryKeys, 1) - assert.Equal(t, "key", writer.primaryKeys[0]) -}