Skip to content

Commit

Permalink
Kill test
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed May 2, 2024
1 parent 2f5638e commit addc49e
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions lib/typing/columns/columns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,51 +132,6 @@ func TestColumn_ShouldBackfill(t *testing.T) {
}
}

func TestColumn_Name(t *testing.T) {
type _testCase struct {
colName string
expectedName string
// Snowflake
expectedNameEsc string
// BigQuery
expectedNameEscBq string
}

testCases := []_testCase{
{
colName: "start",
expectedName: "start",
expectedNameEsc: `"START"`, // since this is a reserved word.
expectedNameEscBq: "`start`", // BQ escapes via backticks.
},
{
colName: "foo",
expectedName: "foo",
expectedNameEsc: `"FOO"`,
expectedNameEscBq: "`foo`",
},
{
colName: "bar",
expectedName: "bar",
expectedNameEsc: `"BAR"`,
expectedNameEscBq: "`bar`",
},
}

snowflakeDialect := sql.SnowflakeDialect{}
bqDialect := sql.BigQueryDialect{}
for _, testCase := range testCases {
col := &Column{
name: testCase.colName,
}

assert.Equal(t, testCase.expectedName, col.Name(), testCase.colName)

assert.Equal(t, testCase.expectedNameEsc, snowflakeDialect.QuoteIdentifier(col.Name()), testCase.colName)
assert.Equal(t, testCase.expectedNameEscBq, bqDialect.QuoteIdentifier(col.Name()), testCase.colName)
}
}

func TestColumns_GetColumnsToUpdate(t *testing.T) {
type _testCase struct {
name string
Expand Down

0 comments on commit addc49e

Please sign in to comment.