From c132d13411e45a9f8062c689bb67c9fcc7c23074 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Thu, 21 Nov 2024 11:35:18 -0800 Subject: [PATCH] Clean up. --- clients/s3/s3_test.go | 8 +++++--- lib/typing/parquet_test.go | 6 ++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clients/s3/s3_test.go b/clients/s3/s3_test.go index 140085e58..b374d63be 100644 --- a/clients/s3/s3_test.go +++ b/clients/s3/s3_test.go @@ -1,10 +1,13 @@ package s3 import ( + "fmt" "strings" "testing" "time" + "github.com/artie-labs/transfer/lib/typing/ext" + "github.com/stretchr/testify/assert" "github.com/artie-labs/transfer/lib/config" @@ -27,7 +30,6 @@ func TestObjectPrefix(t *testing.T) { Schema: "public", }, "table") - td.LatestCDCTs = time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) testCases := []struct { name string tableData *optimization.TableData @@ -49,7 +51,7 @@ func TestObjectPrefix(t *testing.T) { AwsAccessKeyID: "bar", OutputFormat: constants.ParquetFormat, }, - expectedFormat: "db.public.table/2020-01-01", + expectedFormat: fmt.Sprintf("db.public.table/date=%s", time.Now().Format(ext.PostgresDateFormat)), }, { name: "valid #2 w/ folder", @@ -61,7 +63,7 @@ func TestObjectPrefix(t *testing.T) { OutputFormat: constants.ParquetFormat, FolderName: "foo", }, - expectedFormat: "foo/db.public.table/2020-01-01", + expectedFormat: fmt.Sprintf("foo/db.public.table/date=%s", time.Now().Format(ext.PostgresDateFormat)), }, } diff --git a/lib/typing/parquet_test.go b/lib/typing/parquet_test.go index 21e9bc734..83a8193c2 100644 --- a/lib/typing/parquet_test.go +++ b/lib/typing/parquet_test.go @@ -16,7 +16,6 @@ func TestKindDetails_ParquetAnnotation(t *testing.T) { Field{ Tag: FieldTag{ Name: "foo", - InName: ToPtr("foo"), Type: ToPtr("BYTE_ARRAY"), ConvertedType: ToPtr("UTF8"), }.String(), @@ -33,9 +32,8 @@ func TestKindDetails_ParquetAnnotation(t *testing.T) { assert.Equal(t, Field{ Tag: FieldTag{ - Name: "foo", - InName: ToPtr("foo"), - Type: ToPtr("INT64"), + Name: "foo", + Type: ToPtr("INT64"), }.String(), }, *field,