Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ lint:
docker run --rm -v $$PWD:/destination -w /destination golangci/golangci-lint:$(GOLANG_CI_LINT_VERSION) golangci-lint run -v

test:
test -f sdk_tests/configuration.json || cp sdk_tests/default_configuration.json sdk_tests/configuration.json
test -f sdk_tests/configuration.json || cp sdk_tests/default_configuration.json.txt sdk_tests/configuration.json
go test fivetran.com/fivetran_sdk/destination/... -count=1 -v -race $$TEST_ARGS

test-with-coverage:
Expand Down
6 changes: 3 additions & 3 deletions destination/main_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func TestNonExistentRecordUpdatesAndDeletes(t *testing.T) {

func TestSoftTruncateBefore(t *testing.T) {
fileName := "input_soft_truncate_before.json"
tableName := "table_to_truncate"
tableName := "table_to_soft_truncate"
startServer(t)
runSDKTestCommand(t, fileName, true)
assertTableRowsWithPK(t, tableName, [][]string{
Expand All @@ -226,7 +226,7 @@ func TestSoftTruncateBefore(t *testing.T) {

func TestHardTruncateBefore(t *testing.T) {
fileName := "input_hard_truncate_before.json"
tableName := "table_to_truncate"
tableName := "table_to_hard_truncate"
startServer(t)
runSDKTestCommand(t, fileName, true)
assertTableRowsWithPK(t, tableName, [][]string{
Expand Down Expand Up @@ -524,7 +524,7 @@ func readConfigMap(t *testing.T) map[string]string {
rootDir := getProjectRootDir(t)
configBytes, err := os.ReadFile(fmt.Sprintf("%s/sdk_tests/configuration.json", rootDir))
require.NoError(t, err,
"copy the default configuration first: cp sdk_tests/default_configuration.json sdk_tests/configuration.json")
"copy the default configuration first: cp sdk_tests/default_configuration.json.txt sdk_tests/configuration.json")
m := make(map[string]string)
err = json.Unmarshal(configBytes, &m)
require.NoError(t, err)
Expand Down
10 changes: 5 additions & 5 deletions sdk_tests/input_hard_truncate_before.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"create_table": {
"table_to_truncate": {
"table_to_hard_truncate": {
"columns": {
"id": "INT",
"name": "STRING"
Expand All @@ -11,12 +11,12 @@
}
},
"describe_table": [
"table_to_truncate"
"table_to_hard_truncate"
],
"ops": [
{
"upsert": {
"table_to_truncate": [
"table_to_hard_truncate": [
{
"id": 1,
"name": "foo"
Expand All @@ -26,12 +26,12 @@
},
{
"truncate_before": [
"table_to_truncate"
"table_to_hard_truncate"
]
},
{
"upsert": {
"table_to_truncate": [
"table_to_hard_truncate": [
{
"id": 2,
"name": "bar"
Expand Down
10 changes: 5 additions & 5 deletions sdk_tests/input_soft_truncate_before.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"create_table": {
"table_to_truncate": {
"table_to_soft_truncate": {
"columns": {
"id": "INT",
"name": "STRING"
Expand All @@ -11,12 +11,12 @@
}
},
"describe_table": [
"table_to_truncate"
"table_to_soft_truncate"
],
"ops": [
{
"upsert": {
"table_to_truncate": [
"table_to_soft_truncate": [
{
"id": 1,
"name": "foo"
Expand All @@ -26,12 +26,12 @@
},
{
"soft_truncate_before": [
"table_to_truncate"
"table_to_soft_truncate"
]
},
{
"upsert": {
"table_to_truncate": [
"table_to_soft_truncate": [
{
"id": 2,
"name": "bar"
Expand Down