Skip to content

Commit 40d7cfc

Browse files
committed
source versioning: fix failing tests
1 parent 1885878 commit 40d7cfc

File tree

4 files changed

+8
-24
lines changed

4 files changed

+8
-24
lines changed

docs/resources/source_table_postgres.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ resource "materialize_source_table_postgres" "postgres_table_from_source" {
4747

4848
- `comment` (String) Comment on an object in the database.
4949
- `database_name` (String) The identifier for the table database in Materialize. Defaults to `MZ_DATABASE` environment variable if set or `materialize` if environment variable is not set.
50+
- `exclude_columns` (List of String) Exclude specific columns when reading data from PostgreSQL.
5051
- `ownership_role` (String) The owernship role of the object.
5152
- `region` (String) The region to use for the resource connection. If not set, the default region is used.
5253
- `schema_name` (String) The identifier for the table schema in Materialize. Defaults to `public`.

integration/sqlserver.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ resource "materialize_source_sqlserver" "sqlserver_source_all" {
5454
database_name = materialize_connection_sqlserver.sqlserver_connection.database_name
5555
}
5656

57-
exclude_columns = ["dbo.table3.data", "dbo.table1.about", "dbo.table2.about", "dbo.table5.large_text", "dbo.table5.image_data", "dbo.table5.xml_data", "dbo.table5.json_data", "dbo.table10.text_col", "dbo.table10.nvarchar_max"]
57+
exclude_columns = ["dbo.table3.data", "dbo.table1.about", "dbo.table2.about", "dbo.table5.large_text", "dbo.table5.image_data", "dbo.table5.xml_data", "dbo.table5.json_data", "dbo.table6.description", "dbo.table10.text_col", "dbo.table10.nvarchar_max"]
5858
}
5959

6060
# SQL Server Source Table

pkg/provider/acceptance_source_table_mysql_test.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,6 @@ func testAccSourceTableMySQLWithENUMResource(nameSpace string) string {
341341
mysql_connection {
342342
name = materialize_connection_mysql.mysql_connection.name
343343
}
344-
345-
table {
346-
upstream_name = "mysql_table6"
347-
upstream_schema_name = "shop"
348-
name = "mysql_table6_local"
349-
}
350-
351-
text_columns = ["shop.mysql_table6.tags", "shop.mysql_table6.status"]
352344
}
353345
354346
resource "materialize_source_table_mysql" "test_enum" {
@@ -446,14 +438,6 @@ func testAccSourceTableMySQLWithDateTimeTypesResource(nameSpace string) string {
446438
mysql_connection {
447439
name = materialize_connection_mysql.mysql_connection.name
448440
}
449-
450-
table {
451-
upstream_name = "mysql_table10"
452-
upstream_schema_name = "shop"
453-
name = "mysql_table10_local"
454-
}
455-
456-
ignore_columns = ["shop.mysql_table10.year_col"]
457441
}
458442
459443
resource "materialize_source_table_mysql" "test_datetime" {
@@ -467,6 +451,8 @@ func testAccSourceTableMySQLWithDateTimeTypesResource(nameSpace string) string {
467451
468452
upstream_name = "mysql_table10"
469453
upstream_schema_name = "shop"
454+
455+
exclude_columns = ["year_col"]
470456
}
471457
`, nameSpace)
472458
}

pkg/provider/acceptance_source_table_sqlserver_test.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func TestAccSourceTableSQLServer_withUnsupportedTypes(t *testing.T) {
282282
testAccCheckSourceTableSQLServerExists("materialize_source_table_sqlserver.test_unsupported"),
283283
resource.TestCheckResourceAttr("materialize_source_table_sqlserver.test_unsupported", "name", nameSpace+"_table_unsupported"),
284284
resource.TestCheckResourceAttr("materialize_source_table_sqlserver.test_unsupported", "upstream_name", "table5"),
285-
resource.TestCheckResourceAttr("materialize_source_table_sqlserver.test_unsupported", "exclude_columns.#", "2"),
285+
resource.TestCheckResourceAttr("materialize_source_table_sqlserver.test_unsupported", "exclude_columns.#", "4"),
286286
),
287287
},
288288
},
@@ -375,11 +375,6 @@ func testAccSourceTableSQLServerWithUnsupportedTypesResource(nameSpace string) s
375375
sqlserver_connection {
376376
name = materialize_connection_sqlserver.sqlserver_connection.name
377377
}
378-
table {
379-
upstream_name = "table5"
380-
upstream_schema_name = "dbo"
381-
}
382-
exclude_columns = ["dbo.table5.large_text", "dbo.table5.image_data", "dbo.table5.xml_data", "dbo.table5.json_data"]
383378
}
384379
385380
resource "materialize_source_table_sqlserver" "test_unsupported" {
@@ -396,7 +391,9 @@ func testAccSourceTableSQLServerWithUnsupportedTypesResource(nameSpace string) s
396391
397392
exclude_columns = [
398393
"large_text",
399-
"image_data"
394+
"image_data",
395+
"xml_data",
396+
"json_data"
400397
]
401398
}
402399
`, nameSpace)

0 commit comments

Comments
 (0)