Skip to content

Commit

Permalink
more removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Nov 15, 2024
1 parent f8a0f58 commit 0d3e903
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/destination/ddl/ddl_alter_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ func (d *DDLTestSuite) TestAlterDelete_Complete() {
}

// Nothing has been deleted, but it is all added to the permissions table.
assert.Equal(d.T(), originalColumnLength, len(bqTc.Columns().GetColumns()), bqTc.Columns().GetColumns())
assert.Equal(d.T(), originalColumnLength, len(redshiftTc.Columns().GetColumns()), redshiftTc.Columns().GetColumns())
assert.Equal(d.T(), originalColumnLength, len(snowflakeTc.Columns().GetColumns()), snowflakeTc.Columns().GetColumns())
assert.Len(d.T(), bqTc.GetColumns(), originalColumnLength)
assert.Len(d.T(), redshiftTc.GetColumns(), originalColumnLength)
assert.Len(d.T(), snowflakeTc.GetColumns(), originalColumnLength)

assert.Equal(d.T(), originalColumnLength, len(bqTc.ReadOnlyColumnsToDelete()), bqTc.ReadOnlyColumnsToDelete())
assert.Equal(d.T(), originalColumnLength, len(redshiftTc.ReadOnlyColumnsToDelete()), redshiftTc.ReadOnlyColumnsToDelete())
assert.Equal(d.T(), originalColumnLength, len(snowflakeTc.ReadOnlyColumnsToDelete()), snowflakeTc.ReadOnlyColumnsToDelete())
assert.Len(d.T(), bqTc.ReadOnlyColumnsToDelete(), originalColumnLength)
assert.Len(d.T(), redshiftTc.ReadOnlyColumnsToDelete(), originalColumnLength)
assert.Len(d.T(), snowflakeTc.ReadOnlyColumnsToDelete(), originalColumnLength)

for _, column := range cols.GetColumns() {
alterTableArgs := ddl.AlterTableArgs{
Expand Down
2 changes: 1 addition & 1 deletion lib/destination/ddl/ddl_bq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (d *DDLTestSuite) TestAlterTableAddColumns() {
// Check all the columns, make sure it's correct. (length)
assert.Equal(d.T(), newColsLen+existingColsLen, len(d.bigQueryStore.GetConfigMap().TableConfigCache(tableID).Columns().GetColumns()), d.bigQueryStore.GetConfigMap().TableConfigCache(tableID).Columns())
// Check by iterating over the columns
for _, column := range d.bigQueryStore.GetConfigMap().TableConfigCache(tableID).Columns().GetColumns() {
for _, column := range d.bigQueryStore.GetConfigMap().TableConfigCache(tableID).GetColumns() {
existingCol, isOk := existingCols.GetColumn(column.Name())
if !isOk {
// Check new cols?
Expand Down

0 comments on commit 0d3e903

Please sign in to comment.