Skip to content

Commit 6dd1730

Browse files
authored
fix: Use tables with primary key in delete-stale tests (#1195)
Tested by: * cloudquery/cloudquery#13568 * cloudquery/cloudquery#13600 BEGIN_COMMIT_OVERRIDE fix: Use tables with primary key in `delete-stale` tests (#1195) fix: Return a pointer to the actual table column instead of a copy in `schema.Table.Column` (#1195) END_COMMIT_OVERRIDE
1 parent 3c5e6dd commit 6dd1730

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

plugin/testing_write_delete.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func (s *WriterTestSuite) testDeleteStaleBasic(ctx context.Context) {
1919
table := &schema.Table{
2020
Name: tableName,
2121
Columns: schema.ColumnList{
22-
schema.Column{Name: "id", Type: arrow.PrimitiveTypes.Int64},
22+
schema.Column{Name: "id", Type: arrow.PrimitiveTypes.Int64, PrimaryKey: true, NotNull: true},
2323
schema.CqSourceNameColumn,
2424
schema.CqSyncTimeColumn,
2525
},
@@ -85,6 +85,7 @@ func (s *WriterTestSuite) testDeleteStaleAll(ctx context.Context) {
8585
syncTime := time.Now().UTC().Truncate(time.Microsecond)
8686
table := schema.TestTable(tableName, s.genDatOptions)
8787
table.Columns = append(schema.ColumnList{schema.CqSourceNameColumn, schema.CqSyncTimeColumn}, table.Columns...)
88+
table.Columns[table.Columns.Index("id")].PrimaryKey = true
8889
require.NoErrorf(s.t, s.plugin.writeOne(ctx, &message.WriteMigrateTable{Table: table}), "failed to create table")
8990

9091
tg := schema.NewTestDataGenerator()
File renamed without changes.

0 commit comments

Comments
 (0)