Skip to content

Commit 466796b

Browse files
authored
fix: Enable double migration test (#1023)
<!-- Explain what problem this PR addresses --> ---
1 parent 46a9b31 commit 466796b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plugin/testing_write_migrate.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/cloudquery/plugin-sdk/v4/schema"
1313
"github.com/cloudquery/plugin-sdk/v4/types"
1414
"github.com/google/uuid"
15+
"github.com/stretchr/testify/require"
1516
)
1617

1718
func tableUUIDSuffix() string {
@@ -210,9 +211,9 @@ func (s *WriterTestSuite) testMigrate(
210211
})
211212

212213
t.Run("double_migration", func(t *testing.T) {
213-
// tableName := "double_migration_" + tableUUIDSuffix()
214-
// table := schema.TestTable(tableName, testOpts.TestSourceOptions)
215-
// require.NoError(t, p.Migrate(ctx, schema.Tables{table}, MigrateOptions{MigrateMode: MigrateModeForce}))
216-
// require.NoError(t, p.Migrate(ctx, schema.Tables{table}, MigrateOptions{MigrateMode: MigrateModeForce}))
214+
tableName := "double_migration_" + tableUUIDSuffix()
215+
table := schema.TestTable(tableName, s.genDatOptions)
216+
// s.migrate will perform create->write->migrate->write
217+
require.NoError(t, s.migrate(ctx, table, table, true, false))
217218
})
218219
}

0 commit comments

Comments
 (0)